@@ -45,7 +45,7 @@ var _ = Describe("kraft pkg unsource", func() {
45
45
fmt .Print (cmd .DumpError (stdout , stderr , err ))
46
46
}
47
47
Expect (err ).ToNot (HaveOccurred ())
48
- Expect (stderr .String ()).To (BeEmpty ())
48
+ Expect (stdout .String ()).To (BeEmpty ())
49
49
50
50
// Read the config file
51
51
osFile , err := os .Open (cfg .Path ())
@@ -86,8 +86,8 @@ var _ = Describe("kraft pkg unsource", func() {
86
86
_ , ok := cfgMap ["unikraft" ].(map [string ]interface {})
87
87
Expect (ok ).To (BeFalse ())
88
88
89
- // Check if stdout is empty
90
- Expect (stdout .String ()).To (MatchRegexp (`^{"level":"warning","msg":"manifest not found: https://manifests\.kraftkit\.sh/index\.yaml"}\n$` ))
89
+ // Check if stderr contains a log message
90
+ Expect (stderr .String ()).To (MatchRegexp (`^{"level":"warning","msg":"manifest not found: https://manifests\.kraftkit\.sh/index\.yaml"}\n$` ))
91
91
})
92
92
})
93
93
@@ -115,7 +115,7 @@ var _ = Describe("kraft pkg unsource", func() {
115
115
fmt .Print (cmd .DumpError (stdout , stderr , err ))
116
116
}
117
117
Expect (err ).ToNot (HaveOccurred ())
118
- Expect (stderr .String ()).To (BeEmpty ())
118
+ Expect (stdout .String ()).To (BeEmpty ())
119
119
120
120
// Read the config file
121
121
osFile , err := os .Open (cfg .Path ())
@@ -163,8 +163,8 @@ var _ = Describe("kraft pkg unsource", func() {
163
163
// Check if the default manifests are removed
164
164
Expect (cfgMapUnikernelManifests ).To (HaveLen (0 ))
165
165
166
- // Check if stdout is empty
167
- Expect (stdout .String ()).To (MatchRegexp (`^{"level":"warning","msg":"manifest not found: https://manifests\.kraftkit\.sh/index\.yaml"}\n$` ))
166
+ // Check if stderr to contain a log message
167
+ Expect (stderr .String ()).To (MatchRegexp (`^{"level":"warning","msg":"manifest not found: https://manifests\.kraftkit\.sh/index\.yaml"}\n$` ))
168
168
})
169
169
})
170
170
@@ -192,7 +192,7 @@ var _ = Describe("kraft pkg unsource", func() {
192
192
fmt .Print (cmd .DumpError (stdout , stderr , err ))
193
193
}
194
194
Expect (err ).ToNot (HaveOccurred ())
195
- Expect (stderr .String ()).To (BeEmpty ())
195
+ Expect (stdout .String ()).To (BeEmpty ())
196
196
197
197
// Read the config file
198
198
osFile , err := os .Open (cfg .Path ())
@@ -240,8 +240,8 @@ var _ = Describe("kraft pkg unsource", func() {
240
240
// Check if the default manifests are still there
241
241
Expect (cfgMapUnikernelManifests ).To (HaveLen (0 ))
242
242
243
- // Check if stdout contains the warning
244
- Expect (stdout .String ()).To (MatchRegexp (`^{"level":"warning","msg":"manifest not found: https://example\.com"}\n$` ))
243
+ // Check if stderr contains the warning
244
+ Expect (stderr .String ()).To (MatchRegexp (`^{"level":"warning","msg":"manifest not found: https://example\.com"}\n$` ))
245
245
})
246
246
})
247
247
})
@@ -380,7 +380,7 @@ var _ = Describe("kraft pkg unsource", func() {
380
380
fmt .Print (cmd .DumpError (stdout , stderr , err ))
381
381
}
382
382
Expect (err ).ToNot (HaveOccurred ())
383
- Expect (stderr .String ()).To (BeEmpty ())
383
+ Expect (stdout .String ()).To (BeEmpty ())
384
384
385
385
// Read the config file
386
386
osFile , err := os .Open (cfg .Path ())
@@ -429,8 +429,8 @@ var _ = Describe("kraft pkg unsource", func() {
429
429
Expect (cfgMapUnikernelManifests ).To (HaveLen (1 ))
430
430
Expect (cfgMapUnikernelManifests [0 ]).To (Equal ("https://example3.com" ))
431
431
432
- // Check if stdout has a warning
433
- Expect (stdout .String ()).To (MatchRegexp (`^{"level":"warning","msg":"manifest not found: https://example2\.com"}\n$` ))
432
+ // Check if stderr has a warning
433
+ Expect (stderr .String ()).To (MatchRegexp (`^{"level":"warning","msg":"manifest not found: https://example2\.com"}\n$` ))
434
434
})
435
435
})
436
436
})
0 commit comments