A few more container's tests
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c11de8a3e9
commit
157afdcdbe
2 changed files with 57 additions and 52 deletions
|
@ -93,7 +93,7 @@ func (c *Container) GetState() (*apps.AppState, error) {
|
|||
}
|
||||
|
||||
// Status returns state of the container
|
||||
// Possible values: running, stopped, no-container, unknown
|
||||
// Possible values: running, exited (stopped), no-container, unknown
|
||||
func (c *Container) Status() (string, error) {
|
||||
status := "unknown"
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package glue
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
|
@ -67,11 +66,6 @@ func TestMain(m *testing.M) {
|
|||
|
||||
exitVal := m.Run()
|
||||
|
||||
// We don't care about output here because we can't do anything about it
|
||||
//! If testing fails and this won't be performed you have to remove the test container manually
|
||||
fmt.Println("Removing test container")
|
||||
processor.Delete()
|
||||
|
||||
os.Exit(exitVal)
|
||||
}
|
||||
|
||||
|
@ -82,9 +76,9 @@ func TestProcessorCreate(t *testing.T) {
|
|||
assert.Nil(t, err)
|
||||
}
|
||||
|
||||
func TestProcessorList(t *testing.T) {
|
||||
// func TestProcessorList(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorGet(t *testing.T) {
|
||||
err := processor.Create(testAppTemplate)
|
||||
|
@ -92,19 +86,19 @@ func TestProcessorGet(t *testing.T) {
|
|||
|
||||
app, err := processor.Get()
|
||||
assert.Nil(t, err)
|
||||
fmt.Println("State", app.State)
|
||||
assert.Equal(t, "running", app.State)
|
||||
|
||||
processor.Delete()
|
||||
assert.Nil(t, err)
|
||||
}
|
||||
|
||||
func TestProcessorRegister(t *testing.T) {
|
||||
// func TestProcessorRegister(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorUpdate(t *testing.T) {
|
||||
// func TestProcessorUpdate(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorDelete(t *testing.T) {
|
||||
err := processor.Create(testAppTemplate)
|
||||
|
@ -114,81 +108,92 @@ func TestProcessorDelete(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestProcessorStop(t *testing.T) {
|
||||
err := processor.Create(testAppTemplate)
|
||||
assert.Nil(t, err)
|
||||
|
||||
err = processor.Stop()
|
||||
assert.Nil(t, err)
|
||||
|
||||
app, err := processor.Get()
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, "exited", app.State)
|
||||
|
||||
processor.Delete()
|
||||
assert.Nil(t, err)
|
||||
}
|
||||
|
||||
func TestProcessorStart(t *testing.T) {
|
||||
// func TestProcessorStart(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorRestart(t *testing.T) {
|
||||
// func TestProcessorRestart(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorUpdateKeys(t *testing.T) {
|
||||
// func TestProcessorUpdateKeys(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorSetPassword(t *testing.T) {
|
||||
// func TestProcessorSetPassword(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorProcesses(t *testing.T) {
|
||||
// func TestProcessorProcesses(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorEnableTech(t *testing.T) {
|
||||
// func TestProcessorEnableTech(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorRebuild(t *testing.T) {
|
||||
// func TestProcessorRebuild(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorAddLabel(t *testing.T) {
|
||||
// func TestProcessorAddLabel(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorRemoveLabel(t *testing.T) {
|
||||
// func TestProcessorRemoveLabel(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorGetNode(t *testing.T) {
|
||||
// func TestProcessorGetNode(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorCreateSnapshot(t *testing.T) {
|
||||
// func TestProcessorCreateSnapshot(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorRestoreFromSnapshot(t *testing.T) {
|
||||
// func TestProcessorRestoreFromSnapshot(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorListSnapshots(t *testing.T) {
|
||||
// func TestProcessorListSnapshots(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorListAppsSnapshots(t *testing.T) {
|
||||
// func TestProcessorListAppsSnapshots(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorListSnapshotsByLabel(t *testing.T) {
|
||||
// func TestProcessorListSnapshotsByLabel(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorGetSnapshot(t *testing.T) {
|
||||
// func TestProcessorGetSnapshot(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorGetSnapshotDownloadLink(t *testing.T) {
|
||||
// func TestProcessorGetSnapshotDownloadLink(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorDeleteSnapshot(t *testing.T) {
|
||||
// func TestProcessorDeleteSnapshot(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
func TestProcessorDeleteAppSnapshots(t *testing.T) {
|
||||
// func TestProcessorDeleteAppSnapshots(t *testing.T) {
|
||||
|
||||
}
|
||||
// }
|
||||
|
|
Loading…
Reference in a new issue