-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.go
41 lines (38 loc) · 1 KB
/
env.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package main
import (
"fmt"
"github.com/goplugin/plugin-testing-framework/lib/k8s/environment"
"github.com/goplugin/plugin-testing-framework/lib/k8s/pkg/helm/plugin"
"github.com/goplugin/plugin-testing-framework/lib/k8s/pkg/helm/ethereum"
"github.com/goplugin/plugin-testing-framework/lib/k8s/pkg/helm/mockserver"
mockservercfg "github.com/goplugin/plugin-testing-framework/lib/k8s/pkg/helm/mockserver-cfg"
)
func main() {
e := environment.New(&environment.Config{
NamespacePrefix: "modified-env",
Labels: []string{fmt.Sprintf("envType=Modified")},
}).
AddHelm(mockservercfg.New(nil)).
AddHelm(mockserver.New(nil)).
AddHelm(ethereum.New(nil)).
AddHelm(plugin.New(0, map[string]any{
"replicas": 1,
}))
err := e.Run()
if err != nil {
panic(err)
}
e.Cfg.KeepConnection = true
e.Cfg.RemoveOnInterrupt = true
e, err = e.
ReplaceHelm("plugin-0", plugin.New(0, map[string]any{
"replicas": 2,
}))
if err != nil {
panic(err)
}
err = e.Run()
if err != nil {
panic(err)
}
}