ENV, Input, Outpu Expose, Container change of rules
This commit is contained in:
@@ -3,7 +3,6 @@ package resources_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cloud.o-forge.io/core/oc-lib/models/common/models"
|
||||
"cloud.o-forge.io/core/oc-lib/tools"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
@@ -37,36 +36,6 @@ func TestStorageResource_ConvertToPricedResource_InvalidType(t *testing.T) {
|
||||
assert.Nil(t, priced)
|
||||
}
|
||||
|
||||
func TestStorageResourceInstance_ClearEnv(t *testing.T) {
|
||||
inst := &resources.StorageResourceInstance{
|
||||
ResourceInstance: resources.ResourceInstance[*resources.StorageResourcePartnership]{
|
||||
Env: []models.Param{{Attr: "A"}},
|
||||
Inputs: []models.Param{{Attr: "B"}},
|
||||
Outputs: []models.Param{{Attr: "C"}},
|
||||
},
|
||||
}
|
||||
|
||||
inst.ClearEnv()
|
||||
assert.Empty(t, inst.Env)
|
||||
assert.Empty(t, inst.Inputs)
|
||||
assert.Empty(t, inst.Outputs)
|
||||
}
|
||||
|
||||
func TestStorageResourceInstance_StoreDraftDefault(t *testing.T) {
|
||||
inst := &resources.StorageResourceInstance{
|
||||
Source: "my-source",
|
||||
ResourceInstance: resources.ResourceInstance[*resources.StorageResourcePartnership]{
|
||||
Env: []models.Param{},
|
||||
},
|
||||
}
|
||||
|
||||
inst.StoreDraftDefault()
|
||||
assert.Len(t, inst.Env, 1)
|
||||
assert.Equal(t, "source", inst.Env[0].Attr)
|
||||
assert.Equal(t, "my-source", inst.Env[0].Value)
|
||||
assert.True(t, inst.Env[0].Readonly)
|
||||
}
|
||||
|
||||
func TestStorageResourcePricingStrategy_GetQuantity(t *testing.T) {
|
||||
tests := []struct {
|
||||
strategy resources.StorageResourcePricingStrategy
|
||||
|
||||
Reference in New Issue
Block a user