SeanCondon | 3c3d08f | 2022-05-27 11:39:58 +0100 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: 2022-present Intel Corporation |
| 2 | // |
| 3 | // SPDX-License-Identifier: Apache-2.0 |
| 4 | |
| 5 | package tests |
| 6 | |
| 7 | import ( |
| 8 | "testing" |
| 9 | "time" |
| 10 | |
| 11 | "github.com/onosproject/helmit/pkg/helm" |
| 12 | "github.com/onosproject/helmit/pkg/input" |
| 13 | "github.com/onosproject/helmit/pkg/test" |
| 14 | "github.com/stretchr/testify/assert" |
| 15 | ) |
| 16 | |
| 17 | const aetherCharts = "https://charts.aetherproject.org/" |
| 18 | |
| 19 | // FabricUmbrellaSuite is the fabric-umbrella chart test suite |
| 20 | type FabricUmbrellaSuite struct { |
| 21 | test.Suite |
| 22 | c *input.Context |
| 23 | } |
| 24 | |
| 25 | // SetupTestSuite sets up the fabric-umbrella test suite |
| 26 | func (s *FabricUmbrellaSuite) SetupTestSuite(c *input.Context) error { |
| 27 | s.c = c |
| 28 | return nil |
| 29 | } |
| 30 | |
| 31 | // TestInstall tests installing the fabric-umbrella chart |
| 32 | func (s *FabricUmbrellaSuite) TestInstall(t *testing.T) { |
| 33 | registry := s.c.GetArg("registry").String("") |
| 34 | |
| 35 | onos := helm.Chart("fabric-umbrella", aetherCharts). |
| 36 | Release("fabric-umbrella"). |
| 37 | WithTimeout(15*time.Minute). |
| 38 | Set("import.fabric-roc-gui.v0-1.enabled", false). |
| 39 | Set("import.fabric-adapter.v0-1.enabled", false). |
| 40 | Set("import.onos-cli.enabled", false). |
| 41 | Set("import.prometheus.fabric.enabled", false). |
| 42 | Set("fabric-roc-gui.service.type", "NodePort"). |
| 43 | Set("global.image.registry", registry) |
| 44 | assert.NoError(t, onos.Install(true)) |
| 45 | } |