Skip to content

Commit

Permalink
Fix all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
afsalthaj committed Dec 2, 2024
1 parent ec7a3f9 commit e960fa1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions golem-worker-service-base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ golem-wasm-rpc = { workspace = true }
anyhow = { workspace = true }
async-trait = { workspace = true }
bincode = { workspace = true }
bigdecimal = { workspace = true }
bytes = { workspace = true }
chrono = { workspace = true }
conditional-trait-gen = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use bincode::{Decode, Encode};
use serde::{Deserialize, Serialize};

use crate::gateway_binding::WorkerBindingCompiled;
Expand All @@ -28,7 +27,7 @@ pub struct WorkerBinding {
}

// ResponseMapping will consist of actual logic such as invoking worker functions
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Encode, Decode)]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResponseMapping(pub Expr);

impl From<WorkerBindingCompiled> for WorkerBinding {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

use crate::gateway_binding::{ResponseMapping, WorkerBinding};
use crate::gateway_rib_compiler::{DefaultWorkerServiceRibCompiler, WorkerServiceRibCompiler};
use bincode::{Decode, Encode};
use golem_service_base::model::VersionedComponentId;
use golem_wasm_ast::analysis::AnalysedExport;
use rib::{Expr, RibByteCode, RibInputTypeInfo, RibOutputTypeInfo, WorkerFunctionsInRib};
Expand Down Expand Up @@ -61,7 +60,7 @@ impl WorkerBindingCompiled {
}
}

#[derive(Debug, Clone, PartialEq, Encode, Decode)]
#[derive(Debug, Clone, PartialEq)]
pub struct WorkerNameCompiled {
pub worker_name: Expr,
pub compiled_worker_name: RibByteCode,
Expand All @@ -83,7 +82,7 @@ impl WorkerNameCompiled {
}
}

#[derive(Debug, Clone, PartialEq, Encode, Decode)]
#[derive(Debug, Clone, PartialEq)]
pub struct IdempotencyKeyCompiled {
pub idempotency_key: Expr,
pub compiled_idempotency_key: RibByteCode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use bigdecimal::BigDecimal;
use http::header::*;
use poem_openapi::Object;
use rib::{Expr, GetLiteralValue, RibInput, TypeName};
Expand Down Expand Up @@ -285,7 +286,7 @@ impl CorsPreflightExpr {
if let Some(max_age) = &cors.max_age {
cors_parameters.push((
ACCESS_CONTROL_MAX_AGE.to_string(),
Expr::untyped_number_with_type_name(*max_age as f64, TypeName::U64),
Expr::untyped_number_with_type_name(BigDecimal::from(*max_age), TypeName::U64),
));
}

Expand Down

0 comments on commit e960fa1

Please sign in to comment.