@@ -86,9 +86,10 @@ func TestApplicationUpdated(t *testing.T) {
86
86
assert .Equal (t , len (ctrl .vcsToArgoMap .GetMap ()), 2 )
87
87
88
88
oldAppDirectory := ctrl .vcsToArgoMap .GetAppsInRepo ("https://gitlab.com/test/repo.git" )
89
+ assert .Equal (t , oldAppDirectory .AppsCount (), 1 )
90
+
89
91
newAppDirectory := ctrl .vcsToArgoMap .GetAppsInRepo ("https://gitlab.com/test/repo-3.git" )
90
- assert .Equal (t , oldAppDirectory .Count (), 1 )
91
- assert .Equal (t , newAppDirectory .Count (), 0 )
92
+ assert .Equal (t , newAppDirectory .AppsCount (), 0 )
92
93
//
93
94
_ , err := ctrl .applicationClientset .ArgoprojV1alpha1 ().Applications ("default" ).Update (ctx , & v1alpha1.Application {
94
95
ObjectMeta : metav1.ObjectMeta {Name : "test-app-1" , Namespace : "default" },
@@ -102,8 +103,8 @@ func TestApplicationUpdated(t *testing.T) {
102
103
time .Sleep (time .Second * 1 )
103
104
oldAppDirectory = ctrl .vcsToArgoMap .GetAppsInRepo ("https://gitlab.com/test/repo.git" )
104
105
newAppDirectory = ctrl .vcsToArgoMap .GetAppsInRepo ("https://gitlab.com/test/repo-3.git" )
105
- assert .Equal (t , oldAppDirectory .Count (), 0 )
106
- assert .Equal (t , newAppDirectory .Count (), 1 )
106
+ assert .Equal (t , oldAppDirectory .AppsCount (), 0 )
107
+ assert .Equal (t , newAppDirectory .AppsCount (), 1 )
107
108
}
108
109
109
110
func TestApplicationDeleted (t * testing.T ) {
@@ -119,7 +120,7 @@ func TestApplicationDeleted(t *testing.T) {
119
120
assert .Equal (t , len (ctrl .vcsToArgoMap .GetMap ()), 2 )
120
121
121
122
appDirectory := ctrl .vcsToArgoMap .GetAppsInRepo ("https://gitlab.com/test/repo.git" )
122
- assert .Equal (t , appDirectory .Count (), 1 )
123
+ assert .Equal (t , appDirectory .AppsCount (), 1 )
123
124
//
124
125
err := ctrl .applicationClientset .ArgoprojV1alpha1 ().Applications ("default" ).Delete (ctx , "test-app-1" , metav1.DeleteOptions {})
125
126
if err != nil {
@@ -128,7 +129,7 @@ func TestApplicationDeleted(t *testing.T) {
128
129
time .Sleep (time .Second * 1 )
129
130
130
131
appDirectory = ctrl .vcsToArgoMap .GetAppsInRepo ("https://gitlab.com/test/repo.git" )
131
- assert .Equal (t , appDirectory .Count (), 0 )
132
+ assert .Equal (t , appDirectory .AppsCount (), 0 )
132
133
}
133
134
134
135
// TestIsGitRepo will test various URLs against the isGitRepo function.
0 commit comments