Skip to content

Commit

Permalink
test: Attempt to fix e2e tests.
Browse files Browse the repository at this point in the history
* Ensure we sort rules files to get deterministic order

* Ship ceems_tool only with CEEMS API server. Doesnot make sense to ship it with exporter.

Signed-off-by: Mahendra Paipuri <[email protected]>
  • Loading branch information
mahendrapaipuri committed Feb 4, 2025
1 parent 1dff536 commit 8659b79
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
9 changes: 0 additions & 9 deletions build/package/ceems_exporter/nfpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@ contents:
owner: root
group: ceems

# CEEMS tool binary
- src: .build/linux-${GOARCH}/ceems_tool
dst: /usr/local/bin/ceems_tool
expand: true
file_info:
mode: 0750
owner: root
group: ceems

# CEEMS exporter web config file
- src: build/config/common/web-config.yml
dst: /etc/ceems_exporter/web-config.yml
Expand Down
7 changes: 0 additions & 7 deletions build/package/ceems_lb/nfpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ contents:
file_info:
mode: 0511

# CEEMS tool binary
- src: .build/linux-${GOARCH}/ceems_tool
dst: /usr/local/bin/ceems_tool
expand: true
file_info:
mode: 0511

# CEEMS load balancer config file
- src: build/config/ceems_lb/ceems_lb.yml
dst: /etc/ceems_lb/config.yml
Expand Down
10 changes: 5 additions & 5 deletions scripts/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ then
./bin/ceems_tool tsdb create-recording-rules --country-code=FR --output-dir "${tmpdir}/rules" >> "${logfile}" 2>&1

# Add content of each recording file to fixture_output
find "${tmpdir}/rules" -type f -print0 | while IFS= read -r -d $'\0' file; do
find "${tmpdir}/rules" -type f -print0 | sort -z | while IFS= read -r -d $'\0' file; do
echo $(basename "${file}") >> "${fixture_output}"
cat "$file" >> "${fixture_output}"
done
Expand Down Expand Up @@ -1429,10 +1429,10 @@ then
waitport "9500"

prometheus \
--config.file cmd/ceems_tool/testdata/prometheus.yml \
--storage.tsdb.retention.time 10y \
--storage.tsdb.path "${tmpdir}/tsdb" \
--log.level="debug" >> "${logfile}" 2>&1 &
--config.file cmd/ceems_tool/testdata/prometheus.yml \
--storage.tsdb.retention.time 10y \
--storage.tsdb.path "${tmpdir}/tsdb" \
--log.level="debug" >> "${logfile}" 2>&1 &
PROMETHEUS_PID=$!

waitport "9090"
Expand Down

0 comments on commit 8659b79

Please sign in to comment.