Skip to content

Commit 6ff3587

Browse files
add both created at and updated at for list prints
1 parent cdaa7fd commit 6ff3587

11 files changed

Lines changed: 44 additions & 42 deletions

File tree

pkg/commands/ngwaf/countrylist/countrylist_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,13 @@ func TestCountryListUpdate(t *testing.T) {
349349
}
350350

351351
var listListsString = strings.TrimSpace(`
352-
ID Name Description Type Scope Entries Created At
353-
someListID listName NGWAFCLIList country account us 2021-06-15 23:00:00 +0000 UTC
354-
someListID2 listName2 NGWAFCLIList2 country account us 2021-06-15 23:00:00 +0000 UTC
352+
ID Name Description Type Scope Entries Updated At Created At
353+
someListID listName NGWAFCLIList country account us 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
354+
someListID2 listName2 NGWAFCLIList2 country account us 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
355355
`) + "\n"
356356

357357
var zeroListString = strings.TrimSpace(`
358-
ID Name Description Type Scope Entries Created At
358+
ID Name Description Type Scope Entries Updated At Created At
359359
`) + "\n"
360360

361361
var listString = strings.TrimSpace(`

pkg/commands/ngwaf/iplist/iplist_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,13 @@ func TestIPListUpdate(t *testing.T) {
349349
}
350350

351351
var listListsString = strings.TrimSpace(`
352-
ID Name Description Type Scope Entries Created At
353-
someListID listName NGWAFCLIList ip account 1.0.0.0 2021-06-15 23:00:00 +0000 UTC
354-
someListID2 listName2 NGWAFCLIList2 ip account 1.0.0.0 2021-06-15 23:00:00 +0000 UTC
352+
ID Name Description Type Scope Entries Updated At Created At
353+
someListID listName NGWAFCLIList ip account 1.0.0.0 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
354+
someListID2 listName2 NGWAFCLIList2 ip account 1.0.0.0 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
355355
`) + "\n"
356356

357357
var zeroListString = strings.TrimSpace(`
358-
ID Name Description Type Scope Entries Created At
358+
ID Name Description Type Scope Entries Updated At Created At
359359
`) + "\n"
360360

361361
var listString = strings.TrimSpace(`

pkg/commands/ngwaf/signallist/signallist_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,13 @@ func TestSignalListUpdate(t *testing.T) {
349349
}
350350

351351
var listListsString = strings.TrimSpace(`
352-
ID Name Description Type Scope Entries Created At
353-
someListID listName NGWAFCLIList signal account BHH 2021-06-15 23:00:00 +0000 UTC
354-
someListID2 listName2 NGWAFCLIList2 signal account BHH 2021-06-15 23:00:00 +0000 UTC
352+
ID Name Description Type Scope Entries Updated At Created At
353+
someListID listName NGWAFCLIList signal account BHH 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
354+
someListID2 listName2 NGWAFCLIList2 signal account BHH 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
355355
`) + "\n"
356356

357357
var zeroListString = strings.TrimSpace(`
358-
ID Name Description Type Scope Entries Created At
358+
ID Name Description Type Scope Entries Updated At Created At
359359
`) + "\n"
360360

361361
var listString = strings.TrimSpace(`

pkg/commands/ngwaf/stringlist/stringlist_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,13 @@ func TestStringListUpdate(t *testing.T) {
349349
}
350350

351351
var listListsString = strings.TrimSpace(`
352-
ID Name Description Type Scope Entries Created At
353-
someListID listName NGWAFCLIList string account 1.0.0.0 2021-06-15 23:00:00 +0000 UTC
354-
someListID2 listName2 NGWAFCLIList2 string account 1.0.0.0 2021-06-15 23:00:00 +0000 UTC
352+
ID Name Description Type Scope Entries Updated At Created At
353+
someListID listName NGWAFCLIList string account 1.0.0.0 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
354+
someListID2 listName2 NGWAFCLIList2 string account 1.0.0.0 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
355355
`) + "\n"
356356

357357
var zeroListString = strings.TrimSpace(`
358-
ID Name Description Type Scope Entries Created At
358+
ID Name Description Type Scope Entries Updated At Created At
359359
`) + "\n"
360360

361361
var listString = strings.TrimSpace(`

pkg/commands/ngwaf/wildcardlist/wildcardlist_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,13 @@ func TestWildcardListUpdate(t *testing.T) {
349349
}
350350

351351
var listListsString = strings.TrimSpace(`
352-
ID Name Description Type Scope Entries Created At
353-
someListID listName NGWAFCLIList wildcard account 1.0.0.0 2021-06-15 23:00:00 +0000 UTC
354-
someListID2 listName2 NGWAFCLIList2 wildcard account 1.0.0.0 2021-06-15 23:00:00 +0000 UTC
352+
ID Name Description Type Scope Entries Updated At Created At
353+
someListID listName NGWAFCLIList wildcard account 1.0.0.0 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
354+
someListID2 listName2 NGWAFCLIList2 wildcard account 1.0.0.0 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
355355
`) + "\n"
356356

357357
var zeroListString = strings.TrimSpace(`
358-
ID Name Description Type Scope Entries Created At
358+
ID Name Description Type Scope Entries Updated At Created At
359359
`) + "\n"
360360

361361
var listString = strings.TrimSpace(`

pkg/commands/ngwaf/workspace/countrylist/countrylist_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,13 +376,13 @@ func TestCountryListUpdate(t *testing.T) {
376376
}
377377

378378
var listListsString = strings.TrimSpace(`
379-
ID Name Description Type Scope Entries Created At
380-
someListID listName NGWAFCLIList country workspace us 2021-06-15 23:00:00 +0000 UTC
381-
someListID2 listName2 NGWAFCLIList2 country workspace us 2021-06-15 23:00:00 +0000 UTC
379+
ID Name Description Type Scope Entries Updated At Created At
380+
someListID listName NGWAFCLIList country workspace us 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
381+
someListID2 listName2 NGWAFCLIList2 country workspace us 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
382382
`) + "\n"
383383

384384
var zeroListString = strings.TrimSpace(`
385-
ID Name Description Type Scope Entries Created At
385+
ID Name Description Type Scope Entries Updated At Created At
386386
`) + "\n"
387387

388388
var listString = strings.TrimSpace(`

pkg/commands/ngwaf/workspace/iplist/iplist_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,13 +376,13 @@ func TestIPListUpdate(t *testing.T) {
376376
}
377377

378378
var listListsString = strings.TrimSpace(`
379-
ID Name Description Type Scope Entries Created At
380-
someListID listName NGWAFCLIList ip workspace 1.0.0.0 2021-06-15 23:00:00 +0000 UTC
381-
someListID2 listName2 NGWAFCLIList2 ip workspace 1.0.0.0 2021-06-15 23:00:00 +0000 UTC
379+
ID Name Description Type Scope Entries Updated At Created At
380+
someListID listName NGWAFCLIList ip workspace 1.0.0.0 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
381+
someListID2 listName2 NGWAFCLIList2 ip workspace 1.0.0.0 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
382382
`) + "\n"
383383

384384
var zeroListString = strings.TrimSpace(`
385-
ID Name Description Type Scope Entries Created At
385+
ID Name Description Type Scope Entries Updated At Created At
386386
`) + "\n"
387387

388388
var listString = strings.TrimSpace(`

pkg/commands/ngwaf/workspace/signallist/signallist_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,13 +376,13 @@ func TestSignalListUpdate(t *testing.T) {
376376
}
377377

378378
var listListsString = strings.TrimSpace(`
379-
ID Name Description Type Scope Entries Created At
380-
someListID listName NGWAFCLIList signal workspace BHH 2021-06-15 23:00:00 +0000 UTC
381-
someListID2 listName2 NGWAFCLIList2 signal workspace BHH 2021-06-15 23:00:00 +0000 UTC
379+
ID Name Description Type Scope Entries Updated At Created At
380+
someListID listName NGWAFCLIList signal workspace BHH 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
381+
someListID2 listName2 NGWAFCLIList2 signal workspace BHH 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
382382
`) + "\n"
383383

384384
var zeroListString = strings.TrimSpace(`
385-
ID Name Description Type Scope Entries Created At
385+
ID Name Description Type Scope Entries Updated At Created At
386386
`) + "\n"
387387

388388
var listString = strings.TrimSpace(`

pkg/commands/ngwaf/workspace/stringlist/stringlist_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"testing"
1010

1111
root "github.com/fastly/cli/pkg/commands/ngwaf"
12-
sub "github.com/fastly/cli/pkg/commands/ngwaf/workspace"
1312
sub2 "github.com/fastly/cli/pkg/commands/ngwaf/stringlist"
13+
sub "github.com/fastly/cli/pkg/commands/ngwaf/workspace"
1414
fstfmt "github.com/fastly/cli/pkg/fmt"
1515
"github.com/fastly/cli/pkg/testutil"
1616
"github.com/fastly/go-fastly/v12/fastly/ngwaf/v1/lists"
@@ -376,13 +376,13 @@ func TestStringListUpdate(t *testing.T) {
376376
}
377377

378378
var listListsString = strings.TrimSpace(`
379-
ID Name Description Type Scope Entries Created At
380-
someListID listName NGWAFCLIList string workspace 1.0.0.0 2021-06-15 23:00:00 +0000 UTC
381-
someListID2 listName2 NGWAFCLIList2 string workspace 1.0.0.0 2021-06-15 23:00:00 +0000 UTC
379+
ID Name Description Type Scope Entries Updated At Created At
380+
someListID listName NGWAFCLIList string workspace 1.0.0.0 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
381+
someListID2 listName2 NGWAFCLIList2 string workspace 1.0.0.0 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
382382
`) + "\n"
383383

384384
var zeroListString = strings.TrimSpace(`
385-
ID Name Description Type Scope Entries Created At
385+
ID Name Description Type Scope Entries Updated At Created At
386386
`) + "\n"
387387

388388
var listString = strings.TrimSpace(`

pkg/commands/ngwaf/workspace/wildcardlist/wildcardlist_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,13 +376,13 @@ func TestWildcardListUpdate(t *testing.T) {
376376
}
377377

378378
var listListsString = strings.TrimSpace(`
379-
ID Name Description Type Scope Entries Created At
380-
someListID listName NGWAFCLIList wildcard workspace 1.0.0.0 2021-06-15 23:00:00 +0000 UTC
381-
someListID2 listName2 NGWAFCLIList2 wildcard workspace 1.0.0.0 2021-06-15 23:00:00 +0000 UTC
379+
ID Name Description Type Scope Entries Updated At Created At
380+
someListID listName NGWAFCLIList wildcard workspace 1.0.0.0 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
381+
someListID2 listName2 NGWAFCLIList2 wildcard workspace 1.0.0.0 2021-06-15 23:00:00 +0000 UTC 2021-06-15 23:00:00 +0000 UTC
382382
`) + "\n"
383383

384384
var zeroListString = strings.TrimSpace(`
385-
ID Name Description Type Scope Entries Created At
385+
ID Name Description Type Scope Entries Updated At Created At
386386
`) + "\n"
387387

388388
var listString = strings.TrimSpace(`

0 commit comments

Comments
 (0)