github.com/kotalco/kotal@v0.3.0/clients/ethereum2/lighthouse_validator_client_test.go (about) 1 package ethereum2 2 3 import ( 4 ethereum2v1alpha1 "github.com/kotalco/kotal/apis/ethereum2/v1alpha1" 5 sharedAPI "github.com/kotalco/kotal/apis/shared" 6 "github.com/kotalco/kotal/controllers/shared" 7 8 . "github.com/onsi/ginkgo/v2" 9 . "github.com/onsi/gomega" 10 ) 11 12 var _ = Describe("Lighthouse validator client", func() { 13 14 validator := ðereum2v1alpha1.Validator{ 15 Spec: ethereum2v1alpha1.ValidatorSpec{ 16 Client: ethereum2v1alpha1.LighthouseClient, 17 Network: "mainnet", 18 BeaconEndpoints: []string{ 19 "http://localhost:8899", 20 "http://localhost:9988", 21 }, 22 Graffiti: "Validated by Kotal", 23 Logging: sharedAPI.WarnLogs, 24 FeeRecipient: "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", 25 }, 26 } 27 28 validator.Default() 29 client, _ := NewClient(validator) 30 31 It("Should get correct command", func() { 32 Expect(client.Command()).To(ConsistOf("lighthouse", "vc")) 33 }) 34 35 It("Should get correct env", func() { 36 Expect(client.Env()).To(BeNil()) 37 }) 38 39 It("Should get correct home dir", func() { 40 Expect(client.HomeDir()).To(Equal(LighthouseHomeDir)) 41 }) 42 43 It("Should generate correct client arguments", func() { 44 args := client.Args() 45 46 Expect(args).To(ContainElements([]string{ 47 LighthouseDataDir, 48 shared.PathData(client.HomeDir()), 49 LighthouseNetwork, 50 "mainnet", 51 LighthouseBeaconNodeEndpoints, 52 "http://localhost:8899,http://localhost:9988", 53 LighthouseGraffiti, 54 "Validated by Kotal", 55 LighthouseDebugLevel, 56 string(sharedAPI.WarnLogs), 57 LighthouseFeeRecipient, 58 "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", 59 })) 60 }) 61 62 })