Skip to content

Commit cced749

Browse files
committed
Update order of tests and labels
1 parent d97e58e commit cced749

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

internal/watcher/instance/nginx_config_parser_test.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,22 @@ func TestNginxConfigParser_Parse(t *testing.T) {
373373
allowedDirectories: []string{dir},
374374
},
375375
{
376-
name: "Test 4: Log monitoring error for stderr directory",
376+
name: "Test 4: SSL Certificate file path containing variables",
377+
instance: protos.GetNginxPlusInstance([]string{}),
378+
content: testconfig.GetNginxConfWithSSLCertsWithVariables(),
379+
expectedConfigContext: &model.NginxConfigContext{
380+
StubStatus: &model.APIDetails{},
381+
PlusAPI: &model.APIDetails{},
382+
InstanceID: protos.GetNginxPlusInstance([]string{}).GetInstanceMeta().GetInstanceId(),
383+
Files: []*mpi.File{},
384+
AccessLogs: []*model.AccessLog{},
385+
ErrorLogs: []*model.ErrorLog{},
386+
NAPSysLogServers: nil,
387+
},
388+
allowedDirectories: []string{dir},
389+
},
390+
{
391+
name: "Test 5: Error Log outputting to stderr",
377392
instance: protos.GetNginxPlusInstance([]string{}),
378393
content: testconfig.GetNginxConfigWithMultipleAccessLogs(
379394
"stderr",
@@ -393,7 +408,7 @@ func TestNginxConfigParser_Parse(t *testing.T) {
393408
allowedDirectories: []string{dir},
394409
},
395410
{
396-
name: "Test 5: Log monitoring error for stdout directory",
411+
name: "Test 6: Error Log outputting to stdout",
397412
instance: protos.GetNginxPlusInstance([]string{}),
398413
content: testconfig.GetNginxConfigWithMultipleAccessLogs(
399414
"stdout",
@@ -412,21 +427,6 @@ func TestNginxConfigParser_Parse(t *testing.T) {
412427
"config; log errors to file to enable error monitoring",
413428
allowedDirectories: []string{dir},
414429
},
415-
{
416-
name: "Test 4: SSL Certificate file path containing variables",
417-
instance: protos.GetNginxPlusInstance([]string{}),
418-
content: testconfig.GetNginxConfWithSSLCertsWithVariables(),
419-
expectedConfigContext: &model.NginxConfigContext{
420-
StubStatus: &model.APIDetails{},
421-
PlusAPI: &model.APIDetails{},
422-
InstanceID: protos.GetNginxPlusInstance([]string{}).GetInstanceMeta().GetInstanceId(),
423-
Files: []*mpi.File{},
424-
AccessLogs: []*model.AccessLog{},
425-
ErrorLogs: []*model.ErrorLog{},
426-
NAPSysLogServers: nil,
427-
},
428-
allowedDirectories: []string{dir},
429-
},
430430
}
431431

432432
for _, test := range tests {

0 commit comments

Comments
 (0)