Skip to content

Commit 7754bac

Browse files
authored
Merge pull request #16 from lexara-prime-ai/dev
Dev
2 parents 5e861c6 + 3f58aae commit 7754bac

File tree

5 files changed

+29
-7
lines changed

5 files changed

+29
-7
lines changed

.github/workflows/code-coverage.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
- name: Code Coverage Summary
2-
uses: irongut/[email protected]
2+
uses: irongut/[email protected]
3+
4+
'on':
5+
push:
6+
branches: [ "master" ]
7+
tags: '*'

rust/Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "render_cdk"
3-
version = "0.0.3"
3+
version = "0.0.4"
44
edition = "2021"
55
authors = ["Irfan Ghat"]
66
description = "This crate provides a streamlined interface for interacting with Render, a platform that allows you to build, deploy, and scale your apps with ease."

rust/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Add `render_cdk` to your `Cargo.toml`:
2424

2525
```toml
2626
[dependencies]
27-
render_cdk = "0.0.1"
27+
render_cdk = "0.0.4"
2828
```
2929

3030
### Usage

rust/src/main.rs

+20-3
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,21 @@ use tokio::main;
77
/// Examples
88
#[main]
99
async fn main() {
10+
/// Examples
11+
/// 1. Querying for deployed Services.
12+
///
1013
/// List all Services.
1114
let services = ServiceManager::list_all_services("20").await;
1215

13-
// List all Services by Name and Type.
16+
/// List all Services by Name and Type.
1417
let services = ServiceManager::find_service_by_name_and_type("whoami", "web_service").await;
1518

16-
// List all Services by Region.
19+
/// List all Services by Region.
1720
let services = ServiceManager::find_service_by_region("oregon", "10").await;
1821

19-
// List all Services by Environment.
22+
/// List all Services by Environment.
2023
let services = ServiceManager::find_service_by_environment("image", "10").await;
24+
////////////////////////////////////////////////
2125
}
2226

2327
/// Checks for regression of service management functions
@@ -48,6 +52,7 @@ async fn main() {
4852
/// let services = result.unwrap();
4953
/// assert!(!services.is_empty());
5054
/// }
55+
///
5156
/// More tests...
5257
5358
#[cfg(test)]
@@ -86,4 +91,16 @@ mod tests {
8691
let services = result.unwrap();
8792
assert!(!services.is_empty());
8893
}
94+
95+
#[tokio::test]
96+
async fn test_find_service_by_environment() {
97+
let result = ServiceManager::find_service_by_environment("image", "10").await;
98+
99+
// The reult should be Ok().
100+
assert!(result.is_ok());
101+
102+
// Validate data.
103+
let services = result.unwrap();
104+
assert!(!services.is_empty());
105+
}
89106
}

0 commit comments

Comments
 (0)