Skip to content

Commit

Permalink
Merge pull request #60 from merlin-northern/additional_fmt
Browse files Browse the repository at this point in the history
style: Additional formatting in tests
  • Loading branch information
merlin-northern committed Jan 29, 2022
2 parents cd39edd + 1442907 commit 8ba7fbd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions app/daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1104,41 +1104,41 @@ func TestDecreaseSpawnedShellsCount(t *testing.T) {
testCases := []struct {
Name string

CurrentCount uint
DecreaseBy uint
CurrentCount uint
DecreaseBy uint
ExpectedCount uint
}{
{
Name: "decrease by 1 with 1",

CurrentCount: 1,
DecreaseBy: 1,
DecreaseBy: 1,
},
{
Name: "decrease by 1 with many",

CurrentCount: 3,
DecreaseBy: 1,
CurrentCount: 3,
DecreaseBy: 1,
ExpectedCount: 2,
},
{
Name: "decrease by many with many",

CurrentCount: 3,
DecreaseBy: 3,
DecreaseBy: 3,
},
{
Name: "decrease by many with some",

CurrentCount: 255,
DecreaseBy: 3,
CurrentCount: 255,
DecreaseBy: 3,
ExpectedCount: 252,
},
{
Name: "decrease by some with many",

CurrentCount: 3,
DecreaseBy: 255,
CurrentCount: 3,
DecreaseBy: 255,
ExpectedCount: 0,
},
{
Expand All @@ -1163,7 +1163,7 @@ func TestDecreaseSpawnedShellsCount(t *testing.T) {
},
})

daemon.shellsSpawned=tc.CurrentCount
daemon.shellsSpawned = tc.CurrentCount
daemon.DecreaseSpawnedShellsCount(tc.DecreaseBy)

assert.Equal(t, tc.ExpectedCount, daemon.shellsSpawned)
Expand Down

0 comments on commit 8ba7fbd

Please sign in to comment.