-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add run command enabled parameter to AKS cluster
- Loading branch information
1 parent
7c27c45
commit 3c29cd1
Showing
4 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package utils | ||
|
||
import "testing" | ||
|
||
func TestBoolDefault(t *testing.T) { | ||
cases := []struct { | ||
Name string | ||
Input *bool | ||
Default bool | ||
Output bool | ||
}{ | ||
{ | ||
Name: "input true", | ||
Input: Bool(true), | ||
Default: false, | ||
Output: true, | ||
}, | ||
{ | ||
Name: "input nil", | ||
Input: nil, | ||
Default: true, | ||
Output: true, | ||
}, | ||
} | ||
|
||
for _, tc := range cases { | ||
t.Run(tc.Name, func(t *testing.T) { | ||
o := BoolDefault(tc.Input, tc.Default) | ||
if tc.Output != o { | ||
t.Fatalf("Expected BoolDefault to return '%v' for input '%v' and default '%v' (got '%v')", tc.Output, tc.Input, tc.Default, o) | ||
} | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters