refactor(libstack): move library to portainer [EE-5474] (#9120)

This commit is contained in:
Chaim Lev-Ari
2023-06-26 08:11:05 +07:00
committed by GitHub
parent 11571fd6ea
commit 8c16fbb8aa
15 changed files with 691 additions and 0 deletions
@@ -0,0 +1,33 @@
package utils
import (
"testing"
)
func TestIsBinaryPresent(t *testing.T) {
type testCase struct {
Name string
Binary string
Expected bool
}
testCases := []testCase{
{
Name: "not existing",
Binary: "qwgq-er-gerw",
Expected: false,
},
{
Name: "docker-compose exists",
Binary: "docker-compose",
Expected: true,
},
}
for _, tc := range testCases {
got := IsBinaryPresent(tc.Binary)
if got != tc.Expected {
t.Errorf("Error in test %s got = %v, and Expected = %v.", tc.Name, got, tc.Expected)
}
}
}