refactor: stack func to client, mv app to new file

Stack interaction is now under client.

App types and functions moved from env to app under config
This commit is contained in:
2021-08-02 05:51:58 +01:00
parent d777eb2af1
commit bb1eb372ef
6 changed files with 281 additions and 259 deletions

View File

@ -81,34 +81,3 @@ func TestReadEnv(t *testing.T) {
)
}
}
func TestMakeApp(t *testing.T) {
app, err := makeApp(expectedAppEnv, appName, expectedAppFile)
if err != nil {
t.Fatal(err)
}
if !reflect.DeepEqual(app, expectedApp) {
t.Fatalf("did not get expected app type. Expected: %s; Got: %s", app, expectedApp)
}
}
func TestReadAppFile(t *testing.T) {
app, err := readAppFile(expectedAppFile, appName)
if err != nil {
t.Fatal(err)
}
if !reflect.DeepEqual(app, expectedApp) {
t.Fatalf("did not get expected app type. Expected: %s; Got: %s", app, expectedApp)
}
}
func TestGetApp(t *testing.T) {
// TODO: Test failures as well as successes
app, err := GetApp(expectedAppFiles, appName)
if err != nil {
t.Fatal(err)
}
if !reflect.DeepEqual(app, expectedApp) {
t.Fatalf("did not get expected app type. Expected: %s; Got: %s", app, expectedApp)
}
}