test(analyser): fix sorting in expected result

main
sundowndev 2021-03-29 11:28:34 +02:00
parent a637de6f8c
commit b8113671d8
1 changed files with 62 additions and 62 deletions

View File

@ -223,6 +223,17 @@ func TestAnalyze(t *testing.T) {
}{"baz", "bar"},
},
Changelog: Changelog{
{
Change: diff.Change{
Type: "update",
From: "barfoo",
To: "foobar",
Path: []string{
"BarFoo",
},
},
Computed: true,
},
{
Change: diff.Change{
Type: "update",
@ -236,13 +247,13 @@ func TestAnalyze(t *testing.T) {
{
Change: diff.Change{
Type: "update",
From: "barfoo",
To: "foobar",
From: "bar",
To: "baz",
Path: []string{
"BarFoo",
"Struct",
"Bar",
},
},
Computed: true,
},
{
Change: diff.Change{
@ -256,17 +267,6 @@ func TestAnalyze(t *testing.T) {
},
Computed: true,
},
{
Change: diff.Change{
Type: "update",
From: "bar",
To: "baz",
Path: []string{
"Struct",
"Bar",
},
},
},
},
},
},
@ -568,6 +568,17 @@ func TestAnalyze(t *testing.T) {
},
},
Changelog: Changelog{
{
Change: diff.Change{
Type: "update",
From: "barfoo",
To: "foobar",
Path: []string{
"BarFoo",
},
},
Computed: true,
},
{
Change: diff.Change{
Type: "update",
@ -581,13 +592,13 @@ func TestAnalyze(t *testing.T) {
{
Change: diff.Change{
Type: "update",
From: "barfoo",
To: "foobar",
From: "bar",
To: "baz",
Path: []string{
"BarFoo",
"Struct",
"Bar",
},
},
Computed: true,
},
{
Change: diff.Change{
@ -604,13 +615,16 @@ func TestAnalyze(t *testing.T) {
{
Change: diff.Change{
Type: "update",
From: "bar",
To: "baz",
From: "foo",
To: "oof",
Path: []string{
"Struct",
"Bar",
"StructSlice",
"0",
"Array",
"0",
},
},
Computed: true,
},
{
Change: diff.Change{
@ -625,20 +639,6 @@ func TestAnalyze(t *testing.T) {
},
Computed: true,
},
{
Change: diff.Change{
Type: "update",
From: "foo",
To: "oof",
Path: []string{
"StructSlice",
"0",
"Array",
"0",
},
},
Computed: true,
},
},
},
},
@ -765,18 +765,6 @@ func TestAnalyze(t *testing.T) {
}{"baz", "bar"},
},
Changelog: Changelog{
{
Change: diff.Change{
Type: "update",
From: "baz",
To: "bazdiff",
Path: []string{
"Struct",
"Baz",
},
},
Computed: true,
},
{
Change: diff.Change{
Type: "update",
@ -789,6 +777,18 @@ func TestAnalyze(t *testing.T) {
},
Computed: false,
},
{
Change: diff.Change{
Type: "update",
From: "baz",
To: "bazdiff",
Path: []string{
"Struct",
"Baz",
},
},
Computed: true,
},
},
},
{
@ -821,19 +821,6 @@ func TestAnalyze(t *testing.T) {
},
Computed: true,
},
{
Change: diff.Change{
Type: "update",
From: "one",
To: "onediff",
Path: []string{
"StructSlice",
"0",
"String",
},
},
Computed: true,
},
{
Change: diff.Change{
Type: "create",
@ -848,6 +835,19 @@ func TestAnalyze(t *testing.T) {
},
Computed: true,
},
{
Change: diff.Change{
Type: "update",
From: "one",
To: "onediff",
Path: []string{
"StructSlice",
"0",
"String",
},
},
Computed: true,
},
},
},
},