Skip to content

Commit 7177a5a

Browse files
authored
Merge pull request #1116 from lightninglabs/maintenance
Small fixes after recent PRs
2 parents 72551b4 + 6f4d65f commit 7177a5a

File tree

3 files changed

+27
-18
lines changed

3 files changed

+27
-18
lines changed

.github/workflows/main.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ env:
2020
GOPATH: /home/runner/work/go
2121

2222
GO_VERSION: '1.22.3'
23+
24+
LITD_ITEST_BRANCH: '0-19-staging'
2325

2426
jobs:
2527
#######################
@@ -306,7 +308,11 @@ jobs:
306308
uses: ./.github/actions/setup-go
307309

308310
- name: Clone Lit repository
309-
run: git clone https://github.com/lightninglabs/lightning-terminal.git
311+
uses: actions/checkout@v3
312+
with:
313+
repository: lightninglabs/lightning-terminal
314+
ref: ${{ env.LITD_ITEST_BRANCH }}
315+
path: lightning-terminal
310316

311317
- name: Update go.mod to use the local Tap repository
312318
working-directory: ./lightning-terminal
@@ -316,7 +322,7 @@ jobs:
316322
317323
- name: Install yarn
318324
run: npm install -g yarn
319-
325+
320326
- name: setup nodejs
321327
uses: ./lightning-terminal/.github/actions/setup-node
322328
with:

itest/loadtest/config.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,18 @@ type BitcoinConfig struct {
6060

6161
// PrometheusGatewayConfig defines exported config options for connecting to the
6262
// Prometheus PushGateway.
63+
//
64+
//nolint:lll
6365
type PrometheusGatewayConfig struct {
64-
// nolint: lll
65-
Enabled bool `long:"enabled" description:"Enable pushing metrics to Prometheus PushGateway"`
66-
// nolint: lll
66+
Enabled bool `long:"enabled" description:"Enable pushing metrics to Prometheus PushGateway"`
6767
Host string `long:"host" description:"Prometheus PushGateway host address"`
6868
Port int `long:"port" description:"Prometheus PushGateway port"`
6969
PushURL string
7070
}
7171

7272
// Config holds the main configuration for the performance testing binary.
73+
//
74+
//nolint:lll
7375
type Config struct {
7476
// TestCases is a comma separated list of test cases that will be
7577
// executed.
@@ -111,8 +113,6 @@ type Config struct {
111113

112114
// PrometheusGateway is the configuration for the Prometheus
113115
// PushGateway.
114-
//
115-
// nolint: lll
116116
PrometheusGateway *PrometheusGatewayConfig `group:"prometheus-gateway" namespace:"prometheus-gateway" description:"Prometheus PushGateway configuration"`
117117
}
118118

@@ -185,9 +185,8 @@ func ValidateConfig(cfg Config) (*Config, error) {
185185
gatewayPort := cfg.PrometheusGateway.Port
186186

187187
if gatewayHost == "" {
188-
return nil, fmt.Errorf(
189-
"gateway hostname may not be empty",
190-
)
188+
return nil, fmt.Errorf("gateway hostname may not be " +
189+
"empty")
191190
}
192191

193192
if gatewayPort == 0 {

itest/loadtest/load_test.go

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ func TestPerformance(t *testing.T) {
8282
t.Fatalf("test case %v failed", tc.name)
8383
}
8484

85-
// Calculate the test duration and push metrics if the test case succeeded.
85+
// Calculate the test duration and push metrics if the test case
86+
// succeeded.
8687
if cfg.PrometheusGateway.Enabled {
8788
duration := time.Since(startTime).Seconds()
8889

@@ -93,19 +94,22 @@ func TestPerformance(t *testing.T) {
9394
// Update the metric with the test duration.
9495
testDuration.WithLabelValues(label).Set(duration)
9596

96-
t.Logf("Pushing testDuration %v with label %v to gateway", duration, label)
97+
t.Logf("Pushing testDuration %v with label %v to "+
98+
"gateway", duration, label)
9799

98100
// Create a new pusher to push the metrics.
99-
pusher := push.New(cfg.PrometheusGateway.PushURL, "load_test").
100-
Collector(testDuration)
101+
pusher := push.New(
102+
cfg.PrometheusGateway.PushURL, "load_test",
103+
).Collector(testDuration)
101104

102105
// Push the metrics to Prometheus PushGateway.
103106
if err := pusher.Add(); err != nil {
104-
t.Logf("Could not push metrics to Prometheus PushGateway: %v",
105-
err)
107+
t.Logf("Could not push metrics to Prometheus "+
108+
"PushGateway: %v", err)
106109
} else {
107-
t.Logf("Metrics pushed for test case '%s': duration = %v seconds",
108-
tc.name, duration)
110+
t.Logf("Metrics pushed for test case '%s': "+
111+
"duration = %v seconds", tc.name,
112+
duration)
109113
}
110114
}
111115
}

0 commit comments

Comments
 (0)