github.com/metaprov/modela-operator@v0.0.0-20240118193048-f378be8b74d2/controllers/components/modelasystem_test.go (about) 1 package components 2 3 /* 4 func TestModela_Installed(t *testing.T) { 5 modela := NewModelaSystem("v0.4.716") 6 installed, err := modela.Installed(context.Background()) 7 assert.NoError(t, err) 8 assert.False(t, installed) 9 10 } 11 12 func TestModela_InstallAPI(t *testing.T) { 13 modela := NewModelaSystem("v0.4.716") 14 err := modela.InstallCRD(context.Background(), &v1alpha1.Modela{ObjectMeta: v1.ObjectMeta{Name: "modela-test"}}) 15 assert.NoError(t, err) 16 } 17 18 func TestModela_InstallCatalog(t *testing.T) { 19 modela := NewModelaSystem("v0.4.716") 20 err := modela.InstallCatalog(context.Background(), &v1alpha1.Modela{ObjectMeta: v1.ObjectMeta{Name: "modela-test"}}) 21 assert.NoError(t, err) 22 } 23 24 func TestModela_InstallLicense(t *testing.T) { 25 modela := NewModelaSystem("v0.4.716") 26 err := modela.InstallLicense(context.Background(), &v1alpha1.Modela{ObjectMeta: v1.ObjectMeta{Name: "modela-test"}, 27 Spec: v1alpha1.ModelaSpec{ 28 License: v1alpha1.ModelaLicenseSpec{LicenseKey: util.StrPtr("abc123")}, 29 }}) 30 assert.NoError(t, err) 31 } 32 33 func TestModela_Install(t *testing.T) { 34 modela := NewModelaSystem("develop") 35 36 err := modela.Install(context.Background(), &v1alpha1.Modela{ObjectMeta: v1.ObjectMeta{Name: "modela-test"}}) 37 assert.NoError(t, err) 38 } 39 40 func TestModela_Uninstall(t *testing.T) { 41 modela := NewModelaSystem("develop") 42 43 err := modela.Uninstall(context.Background(), &v1alpha1.Modela{ObjectMeta: v1.ObjectMeta{Name: "modela-test"}}) 44 assert.NoError(t, err) 45 }*/