Skip to content

Commit 35105ec

Browse files
committed
chore: fluvio tests
1 parent 563d00c commit 35105ec

File tree

20 files changed

+344
-20
lines changed

20 files changed

+344
-20
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ jobs:
120120
with:
121121
repo-token: ${{ secrets.GITHUB_TOKEN }}
122122

123+
- name: Install FluvioCLI
124+
run: |
125+
curl -fsS https://hub.infinyon.cloud/install/install.sh | bash
126+
export PATH=${PATH}:~/.fluvio/bin:~/.fvm/bin
127+
123128
- name: Tests
124129
run: just test-all
125130

.github/workflows/nightly.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ jobs:
7373
with:
7474
repo-token: ${{ secrets.GITHUB_TOKEN }}
7575

76+
- name: Install FluvioCLI
77+
run: |
78+
curl -fsS https://hub.infinyon.cloud/install/install.sh | bash
79+
export PATH=${PATH}:~/.fluvio/bin:~/.fvm/bin
80+
7681
- name: Tests
7782
run: just test-all
7883

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ jobs:
7373
with:
7474
repo-token: ${{ secrets.GITHUB_TOKEN }}
7575

76+
- name: Install FluvioCLI
77+
run: |
78+
curl -fsS https://hub.infinyon.cloud/install/install.sh | bash
79+
export PATH=${PATH}:~/.fluvio/bin:~/.fvm/bin
80+
7681
- name: Tests
7782
run: just test-all
7883

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ aliri_clock = "0.1.4"
1414
aliri_oauth2 = { version = "0.10.1", features = ["rustls-tls"] }
1515
aliri_tower = "0.6.0"
1616
aliri_traits = "0.1.1"
17+
axum = "0.8.4"
1718
async-recursion = "1.1.1"
1819
async-trait = "0.1.80"
1920
bincode = { version = "2.0.1", features = ["serde"] }

common/src/database/mssql.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target')
32
BEGIN
43
CREATE TABLE target (
@@ -92,7 +91,7 @@ BEGIN
9291
data VARBINARY(MAX) NOT NULL,
9392
made_by VARCHAR(32) NOT NULL REFERENCES oidc_user(id),
9493
action VARCHAR(32) NOT NULL,
95-
version VARCHAR(32) NOT NULL,
94+
version INT NOT NULL,
9695
created_at DATETIME2(3),
9796
);
9897
END;

common/src/database/mysql.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ CREATE TABLE IF NOT EXISTS audit_version (
7070
data BLOB NOT NULL,
7171
made_by VARCHAR(32) NOT NULL,
7272
action VARCHAR(32) NOT NULL,
73-
version VARCHAR(32) NOT NULL,
73+
version INT UNSIGNED NOT NULL,
7474
created_at DATETIME(3),
7575
FOREIGN KEY (made_by) REFERENCES oidc_user(id)
7676
);

common/src/database/postgres.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ CREATE TABLE IF NOT EXISTS audit_version (
6565
data BYTEA NOT NULL,
6666
made_by VARCHAR(32) REFERENCES oidc_user(id) NOT NULL,
6767
action VARCHAR(32) NOT NULL,
68-
version VARCHAR(32) NOT NULL,
68+
version INTEGER NOT NULL,
6969
created_at TIMESTAMP(3)
7070
);

common/src/database/schema/audit.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ pub struct AuditVersion {
7777
}
7878

7979
crud!(AuditVersion {});
80-
impl_select_page!(AuditVersion { select_page_by_resource_type_and_resource_id(resource_type: &impl Serialize, resource_id: &str) => "`WHERE resource_type = #{resource_type} resource_id = #{resource_id}`" });
80+
impl_select_page!(AuditVersion { select_page_by_resource_type_and_resource_id(resource_type: &impl Serialize, resource_id: &str) => "
81+
`WHERE resource_type = #{resource_type} AND resource_id = #{resource_id}`
82+
if do_count == flase:
83+
`ORDER BY version DESC`" });
8184

8285
impl From<&AuditResource> for ProtoResourceKind {
8386
fn from(value: &AuditResource) -> Self {

indexer/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ feedback_fusion_common = { path = "../common" }
88

99
anyhow = "1.0.98"
1010
async-trait = "0.1.88"
11+
axum = "0.8.4"
1112
chrono = { version = "0.4.38", features = ["serde"] }
1213
fluvio = "0.50.1"
1314
futures = "0.3.31"

0 commit comments

Comments
 (0)