|
@@ -17,6 +17,7 @@
|
|
|
package azure
|
|
package azure
|
|
|
|
|
|
|
|
import (
|
|
import (
|
|
|
|
|
+ "context"
|
|
|
"testing"
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/suite"
|
|
"github.com/stretchr/testify/suite"
|
|
@@ -42,6 +43,14 @@ func (suite *BackendSuiteTest) TestGetContainerName() {
|
|
|
Expect(container).To(Equal("service1"))
|
|
Expect(container).To(Equal("service1"))
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+func (suite *BackendSuiteTest) TestErrorMessageDeletingContainerFromComposeApplication() {
|
|
|
|
|
+ service := aciContainerService{}
|
|
|
|
|
+ err := service.Delete(context.TODO(), "compose-app_service1", false)
|
|
|
|
|
+
|
|
|
|
|
+ Expect(err).NotTo(BeNil())
|
|
|
|
|
+ Expect(err.Error()).To(Equal("cannot delete service \"service1\" from compose app \"compose-app\", you must delete the entire compose app with docker compose down"))
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
func TestBackendSuite(t *testing.T) {
|
|
func TestBackendSuite(t *testing.T) {
|
|
|
RegisterTestingT(t)
|
|
RegisterTestingT(t)
|
|
|
suite.Run(t, new(BackendSuiteTest))
|
|
suite.Run(t, new(BackendSuiteTest))
|