-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.go
42 lines (39 loc) · 1006 Bytes
/
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
42
package main
import (
"fmt"
"github.com/goplugin/plugin-testing-framework/lib/k8s/environment"
"github.com/goplugin/plugin-testing-framework/lib/k8s/pkg/cdk8s/blockscout"
"github.com/goplugin/plugin-testing-framework/lib/k8s/pkg/helm/plugin"
"github.com/goplugin/plugin-testing-framework/lib/k8s/pkg/helm/ethereum"
)
func main() {
e := environment.New(&environment.Config{
NamespacePrefix: "modified-env",
Labels: []string{fmt.Sprintf("envType=Modified")},
}).
AddChart(blockscout.New(&blockscout.Props{
WsURL: "ws://geth:8546",
HttpURL: "http://geth:8544",
})).
AddHelm(ethereum.New(nil)).
AddHelm(plugin.New(0, map[string]interface{}{
"replicas": 1,
}))
err := e.Run()
if err != nil {
panic(err)
}
e.ClearCharts()
err = e.
AddChart(blockscout.New(&blockscout.Props{
HttpURL: "http://geth:9000",
})).
AddHelm(ethereum.New(nil)).
AddHelm(plugin.New(0, map[string]interface{}{
"replicas": 1,
})).
Run()
if err != nil {
panic(err)
}
}