Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copy binary stage
FROM --platform=$BUILDPLATFORM alpine:3.18.0 as binary
FROM --platform=$BUILDPLATFORM alpine:3.20.0 AS binary

ARG TARGETPLATFORM

Expand All @@ -8,23 +8,23 @@ COPY target/armv7-unknown-linux-musleabihf/release/chirpstack /usr/bin/chirpstac
COPY target/aarch64-unknown-linux-musl/release/chirpstack /usr/bin/chirpstack-aarch64

RUN case "$TARGETPLATFORM" in \
"linux/amd64") \
cp /usr/bin/chirpstack-x86_64 /usr/bin/chirpstack; \
;; \
"linux/arm/v7") \
cp /usr/bin/chirpstack-armv7hf /usr/bin/chirpstack; \
;; \
"linux/arm64") \
cp /usr/bin/chirpstack-aarch64 /usr/bin/chirpstack; \
;; \
esac;
"linux/amd64") \
cp /usr/bin/chirpstack-x86_64 /usr/bin/chirpstack; \
;; \
"linux/arm/v7") \
cp /usr/bin/chirpstack-armv7hf /usr/bin/chirpstack; \
;; \
"linux/arm64") \
cp /usr/bin/chirpstack-aarch64 /usr/bin/chirpstack; \
;; \
esac;

# Final stage
FROM alpine:3.18.0
FROM alpine:3.20.0

RUN apk --no-cache add \
ca-certificates
ca-certificates

COPY --from=binary /usr/bin/chirpstack /usr/bin/chirpstack
USER nobody:nogroup
ENTRYPOINT ["/usr/bin/chirpstack"]
ENTRYPOINT ["/usr/bin/chirpstack"]
2 changes: 1 addition & 1 deletion chirpstack/src/test/class_a_pr_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ async fn test_sns_uplink() {
}),
f_cnt_up: 8,
n_f_cnt_down: 5,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
rx1_delay: 1,
rx2_frequency: 869525000,
region_config_id: "eu868".into(),
Expand Down
84 changes: 46 additions & 38 deletions chirpstack/src/test/class_a_test.rs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions chirpstack/src/test/class_b_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async fn test_uplink() {
}),
f_cnt_up: 8,
n_f_cnt_down: 5,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
rx2_frequency: 869525000,
region_config_id: "eu868".into(),
..Default::default()
Expand Down Expand Up @@ -265,7 +265,7 @@ async fn test_downlink_scheduler() {
}),
f_cnt_up: 8,
n_f_cnt_down: 5,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
rx2_frequency: 869525000,
region_config_id: "eu868".into(),
class_b_ping_slot_freq: 868300000,
Expand Down
2 changes: 1 addition & 1 deletion chirpstack/src/test/class_c_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async fn test_downlink_scheduler() {
}),
f_cnt_up: 8,
n_f_cnt_down: 5,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
rx2_frequency: 869525000,
region_config_id: "eu868".into(),
..Default::default()
Expand Down
6 changes: 3 additions & 3 deletions chirpstack/src/test/otaa_js_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ async fn test_js() {
}),
rx1_delay: 1,
rx2_frequency: 869525000,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
nb_trans: 1,
region_config_id: "eu868".to_string(),
class_b_ping_slot_nb: 1,
Expand Down Expand Up @@ -230,7 +230,7 @@ async fn test_js() {
js_session_key_id: vec![1, 2, 3, 4],
rx1_delay: 1,
rx2_frequency: 869525000,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
nb_trans: 1,
region_config_id: "eu868".to_string(),
class_b_ping_slot_nb: 1,
Expand Down Expand Up @@ -303,7 +303,7 @@ async fn test_js() {
}),
rx1_delay: 1,
rx2_frequency: 869525000,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
nb_trans: 1,
region_config_id: "eu868".to_string(),
class_b_ping_slot_nb: 1,
Expand Down
20 changes: 10 additions & 10 deletions chirpstack/src/test/otaa_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async fn test_gateway_filtering() {
}),
rx1_delay: 1,
rx2_frequency: 869525000,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
nb_trans: 1,
region_config_id: "eu868".to_string(),
class_b_ping_slot_nb: 1,
Expand Down Expand Up @@ -429,7 +429,7 @@ async fn test_lorawan_10() {
}),
rx1_delay: 1,
rx2_frequency: 869525000,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
nb_trans: 1,
region_config_id: "eu868".to_string(),
class_b_ping_slot_nb: 1,
Expand Down Expand Up @@ -622,7 +622,7 @@ async fn test_lorawan_10() {
}),
rx1_delay: 1,
rx2_frequency: 869525000,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
nb_trans: 1,
region_config_id: "eu868".to_string(),
skip_f_cnt_check: true,
Expand Down Expand Up @@ -669,42 +669,42 @@ async fn test_lorawan_10() {
}),
rx1_delay: 1,
rx2_frequency: 869525000,
enabled_uplink_channel_indices: vec![0, 1, 2, 3, 4, 5, 6, 7],
enabled_uplink_channel_indices: vec![0, 1, 2, 3, 4, 5, 6, 7, 8],
extra_uplink_channels: [
(
3,
4,
internal::DeviceSessionChannel {
frequency: 867100000,
min_dr: 0,
max_dr: 5,
},
),
(
4,
5,
internal::DeviceSessionChannel {
frequency: 867300000,
min_dr: 0,
max_dr: 5,
},
),
(
5,
6,
internal::DeviceSessionChannel {
frequency: 867500000,
min_dr: 0,
max_dr: 5,
},
),
(
6,
7,
internal::DeviceSessionChannel {
frequency: 867700000,
min_dr: 0,
max_dr: 5,
},
),
(
7,
8,
internal::DeviceSessionChannel {
frequency: 867900000,
min_dr: 0,
Expand Down Expand Up @@ -1050,7 +1050,7 @@ async fn test_lorawan_11() {
}),
rx1_delay: 1,
rx2_frequency: 869525000,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
nb_trans: 1,
region_config_id: "eu868".to_string(),
class_b_ping_slot_nb: 1,
Expand Down
4 changes: 2 additions & 2 deletions chirpstack/src/test/relay_class_a_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async fn test_lorawan_10() {
}),
f_cnt_up: 8,
n_f_cnt_down: 5,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
rx1_delay: 1,
rx2_frequency: 869525000,
region_config_id: "eu868".into(),
Expand All @@ -154,7 +154,7 @@ async fn test_lorawan_10() {
}),
f_cnt_up: 88,
n_f_cnt_down: 55,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
rx1_delay: 1,
rx2_frequency: 869525000,
region_config_id: "eu868".into(),
Expand Down
2 changes: 1 addition & 1 deletion chirpstack/src/test/relay_otaa_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ async fn test_lorawan_10() {
}),
rx1_delay: 1,
rx2_frequency: 869525000,
enabled_uplink_channel_indices: vec![0, 1, 2],
enabled_uplink_channel_indices: vec![0, 1, 2, 3],
nb_trans: 1,
region_config_id: "eu868".to_string(),
class_b_ping_slot_nb: 1,
Expand Down
Loading