@voxgig/sdkgen 4.8.2 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/voxgig-sdkgen +1 -1
- package/dist/action/doctor.d.ts +1 -0
- package/dist/action/doctor.js +50 -2
- package/dist/action/doctor.js.map +1 -1
- package/dist/helpers/naming.js +4 -2
- package/dist/helpers/naming.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/model/sdkgen.aon +21 -0
- package/package.json +1 -1
- package/project/.sdk/model/feature/secrets.aon +120 -18
- package/project/.sdk/model/target/c.aon +10 -0
- package/project/.sdk/model/target/clojure.aon +13 -0
- package/project/.sdk/model/target/cpp.aon +10 -0
- package/project/.sdk/model/target/csharp.aon +9 -0
- package/project/.sdk/model/target/dart.aon +10 -0
- package/project/.sdk/model/target/elixir.aon +9 -0
- package/project/.sdk/model/target/go.aon +13 -0
- package/project/.sdk/model/target/java.aon +9 -0
- package/project/.sdk/model/target/js.aon +7 -0
- package/project/.sdk/model/target/kotlin.aon +9 -0
- package/project/.sdk/model/target/lean.aon +17 -0
- package/project/.sdk/model/target/lua.aon +8 -0
- package/project/.sdk/model/target/ocaml.aon +9 -0
- package/project/.sdk/model/target/perl.aon +8 -0
- package/project/.sdk/model/target/php.aon +8 -0
- package/project/.sdk/model/target/py.aon +13 -0
- package/project/.sdk/model/target/rb.aon +8 -0
- package/project/.sdk/model/target/rust.aon +10 -0
- package/project/.sdk/model/target/scala.aon +21 -2
- package/project/.sdk/model/target/swift.aon +18 -0
- package/project/.sdk/model/target/ts.aon +13 -0
- package/project/.sdk/model/target/zig.aon +9 -0
- package/project/.sdk/src/cmp/clojure/Package_clojure.ts +9 -2
- package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +3 -0
- package/project/.sdk/src/cmp/dart/Test_dart.ts +2 -0
- package/project/.sdk/src/cmp/elixir/Package_elixir.ts +4 -1
- package/project/.sdk/src/cmp/go/Config_go.ts +59 -2
- package/project/.sdk/src/cmp/go/Main_go.ts +8 -2
- package/project/.sdk/src/cmp/java/Test_java.ts +6 -5
- package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +6 -5
- package/project/.sdk/src/cmp/lean/Package_lean.ts +23 -0
- package/project/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +1 -0
- package/project/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +1 -0
- package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +1 -0
- package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +7 -3
- package/project/.sdk/src/cmp/py/Config_py.ts +82 -1
- package/project/.sdk/src/cmp/py/Main_py.ts +44 -0
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +2 -0
- package/project/.sdk/src/cmp/swift/Main_swift.ts +10 -0
- package/project/.sdk/src/cmp/swift/Package_swift.ts +13 -1
- package/project/.sdk/src/cmp/ts/Config_ts.ts +42 -17
- package/project/.sdk/src/cmp/ts/fragment/Config.data.fragment.ts +13 -1
- package/project/.sdk/src/cmp/ts/fragment/Config.fragment.ts +13 -1
- package/project/.sdk/src/cmp/zig/Package_zig.ts +15 -11
- package/project/.sdk/src/cmp/zig/fragment/Entity.fragment.zig +3 -3
- package/project/.sdk/src/cmp/zig/fragment/EntityListOp.fragment.zig +3 -3
- package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +3 -3
- package/project/.sdk/src/cmp/zig/utility_zig.ts +50 -1
- package/project/.sdk/tm/c/Makefile +38 -3
- package/project/.sdk/tm/c/tests/omni_resolver.h +361 -0
- package/project/.sdk/tm/c/tests/omni_smoke_test.c +237 -0
- package/project/.sdk/tm/c/tests/primary_corpus_test.c +205 -284
- package/project/.sdk/tm/c/tests/struct_corpus_test.c +292 -212
- package/project/.sdk/tm/c/tests/vendor/omni/json.c +811 -0
- package/project/.sdk/tm/c/tests/vendor/omni/omni.h +240 -0
- package/project/.sdk/tm/c/tests/vendor/omni/runner.c +940 -0
- package/project/.sdk/tm/c/tests/vendor/omni/util.c +351 -0
- package/project/.sdk/tm/c/utility/struct/utility.c +7 -2
- package/project/.sdk/tm/clojure/test/sdk/test/omni.clj +401 -0
- package/project/.sdk/tm/clojure/test/sdk/test/omni_smoke.clj +81 -0
- package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +92 -58
- package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +122 -149
- package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +8 -3
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/json.clj +145 -0
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/runner.clj +445 -0
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/util.clj +145 -0
- package/project/.sdk/tm/cpp/Makefile +5 -1
- package/project/.sdk/tm/cpp/test/omni_resolver.hpp +473 -0
- package/project/.sdk/tm/cpp/test/omni_smoke_test.cpp +209 -0
- package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +243 -184
- package/project/.sdk/tm/cpp/test/runner_support.hpp +68 -181
- package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +183 -56
- package/project/.sdk/tm/cpp/test/vendor/omni/json.hpp +406 -0
- package/project/.sdk/tm/cpp/test/vendor/omni/omni.hpp +751 -0
- package/project/.sdk/tm/cpp/test/vendor/omni/util.hpp +256 -0
- package/project/.sdk/tm/cpp/utility/pipeline.hpp +7 -1
- package/project/.sdk/tm/csharp/test/OmniResolver.cs +491 -0
- package/project/.sdk/tm/csharp/test/OmniSmokeTest.cs +106 -0
- package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +299 -316
- package/project/.sdk/tm/csharp/test/Runner.cs +104 -269
- package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +535 -724
- package/project/.sdk/tm/csharp/test/vendor/omni/Runner.cs +864 -0
- package/project/.sdk/tm/csharp/test/vendor/omni/Util.cs +347 -0
- package/project/.sdk/tm/csharp/utility/MakeSpec.cs +3 -1
- package/project/.sdk/tm/csharp/utility/PrepareMethod.cs +6 -1
- package/project/.sdk/tm/csharp/utility/struct/Struct.cs +21 -5
- package/project/.sdk/tm/dart/test/omni.dart +520 -0
- package/project/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
- package/project/.sdk/tm/dart/test/primary_test.dart +86 -28
- package/project/.sdk/tm/dart/test/struct_test.dart +438 -11
- package/project/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
- package/project/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
- package/project/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
- package/project/.sdk/tm/elixir/Makefile +11 -3
- package/project/.sdk/tm/elixir/test/omni_smoke_test.exs +117 -0
- package/project/.sdk/tm/elixir/test/primary_utility_test.exs +341 -16
- package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +554 -9
- package/project/.sdk/tm/elixir/test/support/omni.ex +377 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/json.ex +122 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/runner.ex +623 -0
- package/project/.sdk/tm/elixir/test/vendor/omni/util.ex +187 -0
- package/project/.sdk/tm/go/core/context.go +32 -16
- package/project/.sdk/tm/go/feature/secrets/plugin/capability.go +261 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/catalog.go +78 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/config.go +652 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/depend.go +250 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/env.go +194 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/export.go +80 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/graph.go +238 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/host.go +1575 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/order.go +248 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/point.go +184 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/ref.go +123 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/resolve.go +79 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/types.go +296 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/util.go +87 -0
- package/project/.sdk/tm/go/feature/secrets/plugin/version.go +161 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/aws.go +292 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/sigv4.go +201 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/azuresecrets/azuresecrets.go +187 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/boru/boru.go +184 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/doppler/doppler.go +114 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/gcpsecrets/gcpsecrets.go +156 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/hashicorp/hashicorp.go +208 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/httpjson/httpjson.go +241 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/infisical/infisical.go +150 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/onepassword/onepassword.go +152 -0
- package/project/.sdk/tm/go/feature/secrets/plugins/secretspec/secretspec.go +143 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/addr.go +120 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/providers.go +442 -0
- package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +714 -0
- package/project/.sdk/tm/go/feature/secrets_feature.go +675 -0
- package/project/.sdk/tm/go/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +799 -0
- package/project/.sdk/tm/go/test/omni/omni.go +902 -0
- package/project/.sdk/tm/go/test/omni/util.go +381 -0
- package/project/.sdk/tm/go/test/omniresolver_test.go +748 -0
- package/project/.sdk/tm/go/test/omnismoke_test.go +112 -0
- package/project/.sdk/tm/go/test/primary_utility_test.go +123 -191
- package/project/.sdk/tm/go/test/struct_utility_test.go +323 -16
- package/project/.sdk/tm/go/test/testsupport_test.go +294 -0
- package/project/.sdk/tm/go/utility/make_options.go +8 -1
- package/project/.sdk/tm/go/utility/prepare_method.go +5 -1
- package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +2 -2
- package/project/.sdk/tm/java/test/OmniResolver.java +355 -0
- package/project/.sdk/tm/java/test/OmniSmokeTest.java +99 -0
- package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +254 -280
- package/project/.sdk/tm/java/test/RunnerSupport.java +9 -194
- package/project/.sdk/tm/java/test/StructCorpusTest.java +119 -42
- package/project/.sdk/tm/java/test/vendor/omni/Json.java +287 -0
- package/project/.sdk/tm/java/test/vendor/omni/Runner.java +851 -0
- package/project/.sdk/tm/java/test/vendor/omni/Util.java +322 -0
- package/project/.sdk/tm/java/utility/MakeSpec.java +3 -1
- package/project/.sdk/tm/java/utility/PrepareMethod.java +5 -5
- package/project/.sdk/tm/java/utility/struct/Struct.java +17 -4
- package/project/.sdk/tm/js/src/utility/StructUtility.js +3 -3
- package/project/.sdk/tm/js/test/omni.js +251 -0
- package/project/.sdk/tm/js/test/omni.test.js +105 -0
- package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +6 -2
- package/project/.sdk/tm/js/test/utility/StructUtility.test.js +27 -2
- package/project/.sdk/tm/js/test/vendor/omni/index.js +77 -0
- package/project/.sdk/tm/js/test/vendor/omni/runner.js +628 -0
- package/project/.sdk/tm/js/test/vendor/omni/util.js +229 -0
- package/project/.sdk/tm/kotlin/core/Utility.kt +1 -1
- package/project/.sdk/tm/kotlin/test/OmniResolver.kt +343 -0
- package/project/.sdk/tm/kotlin/test/OmniSmokeTest.kt +100 -0
- package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +244 -262
- package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +9 -178
- package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +121 -32
- package/project/.sdk/tm/kotlin/test/vendor/omni/Json.kt +264 -0
- package/project/.sdk/tm/kotlin/test/vendor/omni/Runner.kt +615 -0
- package/project/.sdk/tm/kotlin/test/vendor/omni/Util.kt +139 -0
- package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +6 -3
- package/project/.sdk/tm/kotlin/utility/Prepare.kt +6 -6
- package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +18 -2
- package/project/.sdk/tm/lean/Makefile +12 -5
- package/project/.sdk/tm/lean/src/SdkUtility.lean +14 -1
- package/project/.sdk/tm/lean/test/OmniResolver.lean +358 -0
- package/project/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
- package/project/.sdk/tm/lean/test/StructCorpus.lean +245 -574
- package/project/.sdk/tm/lean/test/TPrimaryUtility.lean +155 -291
- package/project/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
- package/project/.sdk/tm/lua/test/omni.lua +456 -0
- package/project/.sdk/tm/lua/test/omni_smoke_test.lua +103 -0
- package/project/.sdk/tm/lua/test/primary_utility_test.lua +250 -509
- package/project/.sdk/tm/lua/test/struct_utility_test.lua +161 -70
- package/project/.sdk/tm/lua/test/vendor/omni/json.lua +268 -0
- package/project/.sdk/tm/lua/test/vendor/omni/regex.lua +385 -0
- package/project/.sdk/tm/lua/test/vendor/omni/runner.lua +641 -0
- package/project/.sdk/tm/lua/test/vendor/omni/util.lua +282 -0
- package/project/.sdk/tm/lua/utility/prepare_method.lua +5 -1
- package/project/.sdk/tm/lua/utility/struct/regex.lua +663 -0
- package/project/.sdk/tm/lua/utility/struct/struct.lua +660 -420
- package/project/.sdk/tm/ocaml/Makefile +37 -12
- package/project/.sdk/tm/ocaml/test/omni_resolver.ml +284 -0
- package/project/.sdk/tm/ocaml/test/omni_smoke_test.ml +169 -0
- package/project/.sdk/tm/ocaml/test/primary_utility_test.ml +84 -100
- package/project/.sdk/tm/ocaml/test/struct_corpus.ml +225 -201
- package/project/.sdk/tm/ocaml/test/vendor/omni/omni.ml +1157 -0
- package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +88 -12
- package/project/.sdk/tm/perl/t/omni.pm +647 -0
- package/project/.sdk/tm/perl/t/omni_smoke.t +87 -0
- package/project/.sdk/tm/perl/t/primary_utility.t +189 -487
- package/project/.sdk/tm/perl/t/struct_utility.t +455 -389
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Runner.pm +649 -0
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Util.pm +253 -0
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni.pm +24 -0
- package/project/.sdk/tm/perl/utility/prepare_method.pm +7 -2
- package/project/.sdk/tm/php/test/Omni.php +691 -0
- package/project/.sdk/tm/php/test/OmniSmokeTest.php +93 -0
- package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +210 -571
- package/project/.sdk/tm/php/test/StructUtilityTest.php +320 -342
- package/project/.sdk/tm/php/test/vendor/omni/Runner.php +644 -0
- package/project/.sdk/tm/php/test/vendor/omni/Util.php +283 -0
- package/project/.sdk/tm/php/utility/MakeSpec.php +10 -3
- package/project/.sdk/tm/php/utility/PrepareBody.php +7 -1
- package/project/.sdk/tm/php/utility/PrepareMethod.php +6 -2
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/__init__.py +36 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/capability.py +141 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/catalog.py +50 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/config.py +333 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/depend.py +198 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/env.py +147 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/export.py +52 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/graph.py +139 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/host.py +1053 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/order.py +171 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/point.py +95 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/ref.py +116 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/resolve.py +59 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/types.py +87 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/version.py +112 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/__init__.py +76 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/addr.py +116 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/aws.py +192 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/azuresecrets.py +120 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/boru.py +140 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/doppler.py +62 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.py +101 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/hashicorp.py +151 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/httpjson.py +115 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/infisical.py +90 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/onepassword.py +101 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/secretspec.py +119 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/sigv4.py +125 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/providers.py +211 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/sekreto.py +475 -0
- package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +467 -0
- package/project/.sdk/tm/py/pkg/utility/prepare_method.py +5 -1
- package/project/.sdk/tm/py/pkg/utility/voxgig_struct/__init__.py +0 -2
- package/project/.sdk/tm/py/pkg/utility/voxgig_struct/voxgig_struct.py +780 -529
- package/project/.sdk/tm/py/src/feature/secrets/.gitkeep +0 -0
- package/project/.sdk/tm/py/test/feature/__init__.py +0 -0
- package/project/.sdk/tm/py/test/feature/secrets/__init__.py +0 -0
- package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +337 -0
- package/project/.sdk/tm/py/test/omni.py +415 -0
- package/project/.sdk/tm/py/test/test_omni_smoke.py +74 -0
- package/project/.sdk/tm/py/test/test_primary_utility.py +144 -668
- package/project/.sdk/tm/py/test/test_struct_utility.py +74 -27
- package/project/.sdk/tm/py/test/voxgig_omni/__init__.py +62 -0
- package/project/.sdk/tm/py/test/voxgig_omni/runner.py +580 -0
- package/project/.sdk/tm/py/test/voxgig_omni/util.py +252 -0
- package/project/.sdk/tm/rb/test/omni.rb +505 -0
- package/project/.sdk/tm/rb/test/omni_smoke_test.rb +72 -0
- package/project/.sdk/tm/rb/test/primary_utility_test.rb +174 -560
- package/project/.sdk/tm/rb/test/struct_utility_test.rb +13 -7
- package/project/.sdk/tm/rb/test/vendor/omni/runner.rb +493 -0
- package/project/.sdk/tm/rb/test/vendor/omni/util.rb +199 -0
- package/project/.sdk/tm/rb/test/vendor/omni/voxgig_omni.rb +15 -0
- package/project/.sdk/tm/rb/utility/prepare_method.rb +5 -1
- package/project/.sdk/tm/rust/tests/common/mod.rs +19 -242
- package/project/.sdk/tm/rust/tests/omni_resolver/mod.rs +888 -0
- package/project/.sdk/tm/rust/tests/omni_smoke_test.rs +286 -0
- package/project/.sdk/tm/rust/tests/primary_utility_test.rs +318 -312
- package/project/.sdk/tm/rust/tests/struct_utility_test.rs +66 -28
- package/project/.sdk/tm/rust/tests/vendor/omni/json.rs +412 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/mod.rs +38 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/regex.rs +392 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/runner.rs +1001 -0
- package/project/.sdk/tm/rust/tests/vendor/omni/util.rs +161 -0
- package/project/.sdk/tm/rust/utility/prepare_method.rs +5 -1
- package/project/.sdk/tm/scala/Makefile +16 -6
- package/project/.sdk/tm/scala/sdktest/OmniResolver.scala +497 -0
- package/project/.sdk/tm/scala/sdktest/OmniSmoke.scala +192 -0
- package/project/.sdk/tm/scala/sdktest/PrimaryCorpus.scala +47 -19
- package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +0 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Json.scala +229 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Runner.scala +552 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Util.scala +104 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +10 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +28 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +5 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +4 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +15 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +6 -1
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniResolver.swift +474 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniSmokeTest.swift +107 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +141 -178
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +17 -113
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +295 -446
- package/project/.sdk/tm/swift/Tests/vendor/omni/Json.swift +364 -0
- package/project/.sdk/tm/swift/Tests/vendor/omni/Runner.swift +730 -0
- package/project/.sdk/tm/swift/Tests/vendor/omni/Util.swift +162 -0
- package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +7 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Capability.ts +148 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Catalog.ts +55 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Config.ts +344 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Depend.ts +205 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Env.ts +138 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Export.ts +46 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/FeatureHost.ts +349 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Graph.ts +181 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Host.ts +1132 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Order.ts +177 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Point.ts +119 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Ref.ts +102 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Resolve.ts +61 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Types.ts +112 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Version.ts +100 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/index.ts +37 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +163 -30
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +27 -22
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/aws.ts +26 -36
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/azuresecrets.ts +19 -21
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/boru.ts +36 -17
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/doppler.ts +14 -21
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/gcpsecrets.ts +27 -27
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/hashicorp.ts +25 -39
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/httpjson.ts +99 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/infisical.ts +14 -16
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{provider → plugins}/onepassword.ts +15 -22
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/secretspec.ts +98 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/{Sigv4.ts → plugins/sigv4.ts} +7 -6
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +97 -23
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/builtin.ts +37 -0
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +4 -17
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +4 -16
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +11 -25
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +6 -23
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +106 -39
- package/project/.sdk/tm/ts/src/utility/StructUtility.ts +3 -3
- package/project/.sdk/tm/ts/test/omni.ts +104 -32
- package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +27 -0
- package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +32 -5
- package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +2 -2
- package/project/.sdk/tm/ts/test/vendor/omni/index.ts +2 -2
- package/project/.sdk/tm/zig/Makefile +15 -1
- package/project/.sdk/tm/zig/build.zig +23 -5
- package/project/.sdk/tm/zig/core/helpers.zig +52 -11
- package/project/.sdk/tm/zig/core/mem.zig +17 -1
- package/project/.sdk/tm/zig/core/utility.zig +23 -19
- package/project/.sdk/tm/zig/feature/audit.zig +2 -2
- package/project/.sdk/tm/zig/feature/cache.zig +2 -2
- package/project/.sdk/tm/zig/feature/debug.zig +5 -5
- package/project/.sdk/tm/zig/feature/netsim.zig +2 -2
- package/project/.sdk/tm/zig/feature/paging.zig +2 -2
- package/project/.sdk/tm/zig/feature/proxy.zig +15 -8
- package/project/.sdk/tm/zig/feature/streaming.zig +5 -5
- package/project/.sdk/tm/zig/feature/support.zig +3 -3
- package/project/.sdk/tm/zig/feature/telemetry.zig +5 -5
- package/project/.sdk/tm/zig/feature/test.zig +10 -5
- package/project/.sdk/tm/zig/test/fh.zig +10 -10
- package/project/.sdk/tm/zig/test/gotcha_test.zig +5 -5
- package/project/.sdk/tm/zig/test/omniresolver.zig +515 -0
- package/project/.sdk/tm/zig/test/omnismoke_test.zig +284 -0
- package/project/.sdk/tm/zig/test/pipeline_test.zig +8 -8
- package/project/.sdk/tm/zig/test/primary_utility_test.zig +145 -155
- package/project/.sdk/tm/zig/test/struct_corpus.zig +264 -187
- package/project/.sdk/tm/zig/test/vendor/omni/omni.zig +1314 -0
- package/project/.sdk/tm/zig/test/vendor/omni/regex.zig +446 -0
- package/project/.sdk/tm/zig/utility/voxgigstruct/regex.zig +7 -4
- package/project/.sdk/tm/zig/utility/voxgigstruct/struct.zig +356 -157
- package/project/sdkgen-package.json +1 -1
- package/src/action/doctor.ts +66 -2
- package/src/helpers/naming.ts +4 -2
- package/project/.sdk/tm/c/tests/runner.h +0 -274
- package/project/.sdk/tm/cpp/test/struct_runner.hpp +0 -314
- package/project/.sdk/tm/csharp/test/StructRunner.cs +0 -276
- package/project/.sdk/tm/dart/test/runner.dart +0 -406
- package/project/.sdk/tm/dart/test/struct_corpus.dart +0 -531
- package/project/.sdk/tm/elixir/test/support/struct_corpus.ex +0 -1088
- package/project/.sdk/tm/go/test/runner_test.go +0 -629
- package/project/.sdk/tm/go/test/struct_runner_test.go +0 -1094
- package/project/.sdk/tm/java/test/StructRunner.java +0 -281
- package/project/.sdk/tm/js/test/runner.js +0 -387
- package/project/.sdk/tm/kotlin/test/StructRunner.kt +0 -177
- package/project/.sdk/tm/lua/test/struct_runner.lua +0 -602
- package/project/.sdk/tm/ocaml/test/corpus_runner.ml +0 -185
- package/project/.sdk/tm/perl/t/struct_runner.pm +0 -275
- package/project/.sdk/tm/php/test/StructRunner.php +0 -275
- package/project/.sdk/tm/py/test/struct_runner.py +0 -411
- package/project/.sdk/tm/rb/test/struct_runner.rb +0 -309
- package/project/.sdk/tm/rust/tests/struct_runner/mod.rs +0 -424
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/Registry.ts +0 -90
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/http.ts +0 -66
- package/project/.sdk/tm/ts/test/vendor/omni/compat.ts +0 -188
- package/project/.sdk/tm/zig/test/struct_runner.zig +0 -464
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
package KOTLINPACKAGE.sdktest
|
|
2
2
|
|
|
3
3
|
// Drives the primary utility functions against the shared test.json spec
|
|
4
|
-
// (../.sdk/test/test.json, section "primary")
|
|
4
|
+
// (../.sdk/test/test.json, section "primary") through the VENDORED omni
|
|
5
|
+
// runner (OmniResolver over test/vendor/omni). Mirrors
|
|
6
|
+
// tm/java/test/PrimaryUtilityTest.java and tm/go/test/primary_utility_test.go.
|
|
7
|
+
//
|
|
8
|
+
// Subjects receive omni's native argument list as plain values: a ctx entry
|
|
9
|
+
// arrives as args[0], a MAP - OmniResolver.omniCtx builds the typed Context
|
|
10
|
+
// a generated utility takes, and OmniResolver.omniSyncCtx writes the
|
|
11
|
+
// observable ctx state back for `match: {ctx: ...}` assertions.
|
|
5
12
|
|
|
6
13
|
import java.util.function.BiFunction
|
|
7
14
|
|
|
@@ -10,34 +17,95 @@ import org.junit.jupiter.api.Assertions.assertFalse
|
|
|
10
17
|
import org.junit.jupiter.api.Assertions.assertNotNull
|
|
11
18
|
import org.junit.jupiter.api.Assertions.assertNull
|
|
12
19
|
import org.junit.jupiter.api.Assertions.assertTrue
|
|
20
|
+
import org.junit.jupiter.api.Assertions.fail
|
|
13
21
|
import org.junit.jupiter.api.Test
|
|
14
22
|
|
|
15
23
|
import KOTLINPACKAGE.core.Context
|
|
24
|
+
import KOTLINPACKAGE.core.Entity
|
|
16
25
|
import KOTLINPACKAGE.core.Helpers
|
|
17
26
|
import KOTLINPACKAGE.core.Operation
|
|
18
27
|
import KOTLINPACKAGE.core.ProjectNameSDK
|
|
19
28
|
import KOTLINPACKAGE.core.Result
|
|
29
|
+
import KOTLINPACKAGE.core.SdkError
|
|
20
30
|
import KOTLINPACKAGE.core.Spec
|
|
21
31
|
import KOTLINPACKAGE.core.Utility
|
|
22
32
|
import KOTLINPACKAGE.feature.BaseFeature
|
|
23
33
|
import KOTLINPACKAGE.sdktest.FeatureHarness.fhMap
|
|
24
|
-
import KOTLINPACKAGE.sdktest.RunnerSupport.getSpec
|
|
25
|
-
import KOTLINPACKAGE.sdktest.RunnerSupport.loadTestSpec
|
|
26
|
-
import KOTLINPACKAGE.sdktest.RunnerSupport.makeCtxFromMap
|
|
27
|
-
import KOTLINPACKAGE.sdktest.RunnerSupport.runset
|
|
28
34
|
|
|
29
35
|
@Suppress("UNCHECKED_CAST")
|
|
30
36
|
class PrimaryUtilityTest {
|
|
31
37
|
|
|
32
|
-
|
|
33
|
-
val
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
companion object {
|
|
39
|
+
const val TEST_JSON_FILE = "../.sdk/test/test.json"
|
|
40
|
+
|
|
41
|
+
// PENDING sections are the ones deliberately left empty in the shared
|
|
42
|
+
// corpus (.sdk/test/primary/<name>.aon). Everything else MUST
|
|
43
|
+
// contribute cases.
|
|
44
|
+
val PENDING = setOf(
|
|
45
|
+
"fetcher", "makeFetchDef", "makeResult",
|
|
46
|
+
"featureAdd", "featureHook", "featureInit",
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
// One client + one corpus runner for the whole suite (the go shape).
|
|
50
|
+
private var CLIENT: ProjectNameSDK? = null
|
|
51
|
+
private var UTILITY: Utility? = null
|
|
52
|
+
private var RUN: OmniResolver.Run? = null
|
|
53
|
+
|
|
54
|
+
@Synchronized
|
|
55
|
+
fun run(): OmniResolver.Run {
|
|
56
|
+
var r = RUN
|
|
57
|
+
if (null == r) {
|
|
58
|
+
val client = ProjectNameSDK.testSDK()
|
|
59
|
+
CLIENT = client
|
|
60
|
+
UTILITY = client.getUtility()
|
|
61
|
+
r = OmniResolver.makeRunner(TEST_JSON_FILE, client).runner("primary", null)
|
|
62
|
+
assertNotNull(r.spec, "primary section not found in test.json")
|
|
63
|
+
RUN = r
|
|
64
|
+
}
|
|
65
|
+
return r
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
fun client(): ProjectNameSDK {
|
|
69
|
+
run()
|
|
70
|
+
return CLIENT!!
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
fun utility(): Utility {
|
|
74
|
+
run()
|
|
75
|
+
return UTILITY!!
|
|
76
|
+
}
|
|
37
77
|
}
|
|
38
78
|
|
|
39
|
-
|
|
79
|
+
// Run one corpus section, failing loudly when it would run ZERO cases.
|
|
80
|
+
// A renamed section, a fixture that failed to compile, or an empty set
|
|
81
|
+
// used to report PASS while running zero assertions - the whole point of
|
|
82
|
+
// a shared oracle lost without a single red test. (The guard lives here
|
|
83
|
+
// rather than in the runner, which is vendored verbatim; the shared
|
|
84
|
+
// corpus is a v0 spec, and v0 tolerates an empty set.)
|
|
85
|
+
private fun runsection(name: String, subject: OmniResolver.Subject) {
|
|
86
|
+
val run = run()
|
|
87
|
+
val section = Helpers.toMapAny(run.spec[name])
|
|
88
|
+
assertNotNull(
|
|
89
|
+
section,
|
|
90
|
+
"test corpus section \"$name\" missing - check the name against .sdk/test/primary/",
|
|
91
|
+
)
|
|
92
|
+
val basic = Helpers.toMapAny(section!!["basic"])
|
|
93
|
+
val set = basic?.get("set")
|
|
94
|
+
if (set !is List<*>) {
|
|
95
|
+
fail<Any>("test corpus section \"$name\" has no basic.set list - zero cases would run")
|
|
96
|
+
return
|
|
97
|
+
}
|
|
98
|
+
if (set.isEmpty() && !PENDING.contains(name)) {
|
|
99
|
+
fail<Any>(
|
|
100
|
+
"test corpus section \"$name\" is EMPTY - zero cases would run; " +
|
|
101
|
+
"add cases, or mark the fixture PENDING in .sdk/test/primary/",
|
|
102
|
+
)
|
|
103
|
+
return
|
|
104
|
+
}
|
|
105
|
+
run.runset(basic, subject)
|
|
106
|
+
}
|
|
40
107
|
|
|
108
|
+
// Helper: create basic test context.
|
|
41
109
|
private fun makeTestCtx(client: ProjectNameSDK, utility: Utility, overrides: MutableMap<String, Any?>?): Context {
|
|
42
110
|
val ctxmap = linkedMapOf<String, Any?>()
|
|
43
111
|
ctxmap["opname"] = "load"
|
|
@@ -49,6 +117,7 @@ class PrimaryUtilityTest {
|
|
|
49
117
|
return utility.makeContext(ctxmap, client.getRootCtx())
|
|
50
118
|
}
|
|
51
119
|
|
|
120
|
+
// Helper: create full test context with point and match.
|
|
52
121
|
private fun makeTestFullCtx(client: ProjectNameSDK, utility: Utility): Context {
|
|
53
122
|
val ctx = makeTestCtx(client, utility, null)
|
|
54
123
|
val params = mutableListOf<Any?>()
|
|
@@ -74,8 +143,7 @@ class PrimaryUtilityTest {
|
|
|
74
143
|
|
|
75
144
|
@Test
|
|
76
145
|
fun exists() {
|
|
77
|
-
val
|
|
78
|
-
val utility = client.getUtility()
|
|
146
|
+
val utility = utility()
|
|
79
147
|
|
|
80
148
|
assertNotNull(utility.clean, "clean")
|
|
81
149
|
assertNotNull(utility.done, "done")
|
|
@@ -111,54 +179,51 @@ class PrimaryUtilityTest {
|
|
|
111
179
|
@Test
|
|
112
180
|
fun cleanBasic() {
|
|
113
181
|
val client = client()
|
|
114
|
-
val utility =
|
|
182
|
+
val utility = utility()
|
|
115
183
|
val ctx = makeTestCtx(client, utility, null)
|
|
116
184
|
val cleaned = utility.clean(ctx, fhMap("key", "secret123", "name", "test"))
|
|
117
185
|
assertNotNull(cleaned, "cleaned should not be null")
|
|
118
186
|
}
|
|
119
187
|
|
|
188
|
+
@Test
|
|
189
|
+
fun cleanCorpus() {
|
|
190
|
+
runsection("clean") { args ->
|
|
191
|
+
if (2 != args.size) {
|
|
192
|
+
throw RuntimeException("clean: expected 2 args, got ${args.size}")
|
|
193
|
+
}
|
|
194
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
195
|
+
utility().clean(ctx, args[1])
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
120
199
|
@Test
|
|
121
200
|
fun doneBasic() {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
val ctxmap = Helpers.toMapAny(entry["ctx"])
|
|
126
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
127
|
-
RunnerSupport.fixctx(ctx, client)
|
|
128
|
-
utility.done(ctx)
|
|
201
|
+
runsection("done") { args ->
|
|
202
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
203
|
+
utility().done(ctx)
|
|
129
204
|
}
|
|
130
205
|
}
|
|
131
206
|
|
|
132
207
|
@Test
|
|
133
208
|
fun makeErrorBasic() {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
runset(getSpec(primary(), "makeError", "basic")) { entry ->
|
|
137
|
-
val args = if (entry["args"] is List<*>) (entry["args"] as MutableList<Any?>) else mutableListOf()
|
|
138
|
-
if (args.isEmpty()) {
|
|
139
|
-
args.add(linkedMapOf<String, Any?>())
|
|
140
|
-
}
|
|
209
|
+
runsection("makeError") { args ->
|
|
210
|
+
val ctxarg = if (args.isEmpty()) linkedMapOf<String, Any?>() else args[0]
|
|
141
211
|
|
|
142
|
-
|
|
143
|
-
if (ctxmap == null) {
|
|
144
|
-
ctxmap = linkedMapOf()
|
|
145
|
-
}
|
|
146
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
147
|
-
RunnerSupport.fixctx(ctx, client)
|
|
212
|
+
val ctx = OmniResolver.omniCtx(ctxarg, client(), utility())
|
|
148
213
|
|
|
149
214
|
var err: RuntimeException? = null
|
|
150
215
|
if (args.size > 1) {
|
|
151
216
|
err = RunnerSupport.errFromMap(Helpers.toMapAny(args[1]))
|
|
152
217
|
}
|
|
153
218
|
|
|
154
|
-
utility.makeError(ctx, err)
|
|
219
|
+
utility().makeError(ctx, err)
|
|
155
220
|
}
|
|
156
221
|
}
|
|
157
222
|
|
|
158
223
|
@Test
|
|
159
224
|
fun makeErrorNoThrow() {
|
|
160
225
|
val client = client()
|
|
161
|
-
val utility =
|
|
226
|
+
val utility = utility()
|
|
162
227
|
val ctx = makeTestFullCtx(client, utility)
|
|
163
228
|
ctx.ctrl.throwing = false
|
|
164
229
|
val resmap = linkedMapOf<String, Any?>()
|
|
@@ -175,7 +240,7 @@ class PrimaryUtilityTest {
|
|
|
175
240
|
@Test
|
|
176
241
|
fun featureAddBasic() {
|
|
177
242
|
val client = client()
|
|
178
|
-
val utility =
|
|
243
|
+
val utility = utility()
|
|
179
244
|
val ctx = makeTestCtx(client, utility, null)
|
|
180
245
|
val startLen = client.features.size
|
|
181
246
|
|
|
@@ -194,7 +259,7 @@ class PrimaryUtilityTest {
|
|
|
194
259
|
|
|
195
260
|
@Test
|
|
196
261
|
fun featureHookBasic() {
|
|
197
|
-
val hookClient =
|
|
262
|
+
val hookClient = ProjectNameSDK.testSDK()
|
|
198
263
|
val hookUtility = hookClient.getUtility()
|
|
199
264
|
val ctx = makeTestCtx(hookClient, hookUtility, null)
|
|
200
265
|
|
|
@@ -217,7 +282,7 @@ class PrimaryUtilityTest {
|
|
|
217
282
|
|
|
218
283
|
@Test
|
|
219
284
|
fun featureInitBasic() {
|
|
220
|
-
val initClient =
|
|
285
|
+
val initClient = ProjectNameSDK.testSDK()
|
|
221
286
|
val initUtility = initClient.getUtility()
|
|
222
287
|
val ctx = makeTestCtx(initClient, initUtility, null)
|
|
223
288
|
ctx.options!!["feature"] = fhMap("initfeat", fhMap("active", true))
|
|
@@ -234,7 +299,7 @@ class PrimaryUtilityTest {
|
|
|
234
299
|
|
|
235
300
|
@Test
|
|
236
301
|
fun featureInitInactive() {
|
|
237
|
-
val initClient =
|
|
302
|
+
val initClient = ProjectNameSDK.testSDK()
|
|
238
303
|
val initUtility = initClient.getUtility()
|
|
239
304
|
val ctx = makeTestCtx(initClient, initUtility, null)
|
|
240
305
|
ctx.options!!["feature"] = fhMap("nofeat", fhMap("active", false))
|
|
@@ -252,8 +317,11 @@ class PrimaryUtilityTest {
|
|
|
252
317
|
@Test
|
|
253
318
|
fun fetcherLive() {
|
|
254
319
|
val calls = mutableListOf<MutableMap<String, Any?>>()
|
|
320
|
+
// Concrete base: a live construction must satisfy any server variables a
|
|
321
|
+
// templated base URL declares; a literal base sidesteps the requirement.
|
|
255
322
|
val liveClient = ProjectNameSDK(
|
|
256
323
|
fhMap(
|
|
324
|
+
"base", "http://localhost:8080",
|
|
257
325
|
"system",
|
|
258
326
|
fhMap(
|
|
259
327
|
"fetch",
|
|
@@ -279,8 +347,13 @@ class PrimaryUtilityTest {
|
|
|
279
347
|
|
|
280
348
|
@Test
|
|
281
349
|
fun fetcherBlockedTestMode() {
|
|
350
|
+
// Create a live SDK then set mode to test (not using testSDK, which
|
|
351
|
+
// installs the test feature).
|
|
352
|
+
// Concrete base: a live construction must satisfy any server variables a
|
|
353
|
+
// templated base URL declares; a literal base sidesteps the requirement.
|
|
282
354
|
val blockedClient = ProjectNameSDK(
|
|
283
355
|
fhMap(
|
|
356
|
+
"base", "http://localhost:8080",
|
|
284
357
|
"system",
|
|
285
358
|
fhMap("fetch", BiFunction<String, MutableMap<String, Any?>, MutableMap<String, Any?>> { _, _ -> linkedMapOf() }),
|
|
286
359
|
),
|
|
@@ -305,12 +378,10 @@ class PrimaryUtilityTest {
|
|
|
305
378
|
|
|
306
379
|
@Test
|
|
307
380
|
fun makeContextBasic() {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
runset(getSpec(primary(), "makeContext", "basic")) { entry ->
|
|
311
|
-
val inm = Helpers.toMapAny(entry["in"])
|
|
381
|
+
runsection("makeContext") { args ->
|
|
382
|
+
val inm = Helpers.toMapAny(args.getOrNull(0))
|
|
312
383
|
if (inm != null) {
|
|
313
|
-
val ctx = utility.makeContext(inm, null)
|
|
384
|
+
val ctx = utility().makeContext(inm, null)
|
|
314
385
|
val out = linkedMapOf<String, Any?>()
|
|
315
386
|
out["id"] = ctx.id
|
|
316
387
|
out["op"] = fhMap("name", ctx.op.name, "input", ctx.op.input)
|
|
@@ -324,7 +395,7 @@ class PrimaryUtilityTest {
|
|
|
324
395
|
@Test
|
|
325
396
|
fun makeFetchDefBasic() {
|
|
326
397
|
val client = client()
|
|
327
|
-
val utility =
|
|
398
|
+
val utility = utility()
|
|
328
399
|
val ctx = makeTestFullCtx(client, utility)
|
|
329
400
|
ctx.spec = Spec(
|
|
330
401
|
fhMap(
|
|
@@ -352,7 +423,7 @@ class PrimaryUtilityTest {
|
|
|
352
423
|
@Test
|
|
353
424
|
fun makeFetchDefWithBody() {
|
|
354
425
|
val client = client()
|
|
355
|
-
val utility =
|
|
426
|
+
val utility = utility()
|
|
356
427
|
val ctx = makeTestFullCtx(client, utility)
|
|
357
428
|
ctx.spec = Spec(
|
|
358
429
|
fhMap(
|
|
@@ -378,42 +449,30 @@ class PrimaryUtilityTest {
|
|
|
378
449
|
|
|
379
450
|
@Test
|
|
380
451
|
fun makeOptionsBasic() {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
runset(getSpec(primary(), "makeOptions", "basic")) { entry ->
|
|
384
|
-
val inm = Helpers.toMapAny(entry["in"])
|
|
452
|
+
runsection("makeOptions") { args ->
|
|
453
|
+
val inm = Helpers.toMapAny(args.getOrNull(0))
|
|
385
454
|
val ctxmap = linkedMapOf<String, Any?>()
|
|
386
455
|
if (inm != null) {
|
|
387
456
|
ctxmap["options"] = inm["options"]
|
|
388
457
|
ctxmap["config"] = inm["config"]
|
|
389
458
|
}
|
|
390
|
-
val ctx = utility.makeContext(ctxmap, null)
|
|
391
|
-
ctx.client = client
|
|
392
|
-
ctx.utility = utility
|
|
393
|
-
utility.makeOptions(ctx)
|
|
459
|
+
val ctx = utility().makeContext(ctxmap, null)
|
|
460
|
+
ctx.client = client()
|
|
461
|
+
ctx.utility = utility()
|
|
462
|
+
utility().makeOptions(ctx)
|
|
394
463
|
}
|
|
395
464
|
}
|
|
396
465
|
|
|
397
466
|
@Test
|
|
398
467
|
fun makeRequestBasic() {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
val entryCtx = Helpers.toMapAny(entry["ctx"])
|
|
409
|
-
if (entryCtx != null) {
|
|
410
|
-
if (ctx.response != null) {
|
|
411
|
-
entryCtx["response"] = "exists"
|
|
412
|
-
}
|
|
413
|
-
if (ctx.result != null) {
|
|
414
|
-
entryCtx["result"] = "exists"
|
|
415
|
-
}
|
|
416
|
-
}
|
|
468
|
+
runsection("makeRequest") { args ->
|
|
469
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
470
|
+
ctx.options = client().optionsMap()
|
|
471
|
+
|
|
472
|
+
utility().makeRequest(ctx)
|
|
473
|
+
|
|
474
|
+
// Expose response/result existence for the match assertions.
|
|
475
|
+
OmniResolver.omniSyncCtx(args[0], ctx)
|
|
417
476
|
|
|
418
477
|
null
|
|
419
478
|
}
|
|
@@ -421,25 +480,12 @@ class PrimaryUtilityTest {
|
|
|
421
480
|
|
|
422
481
|
@Test
|
|
423
482
|
fun makeResponseBasic() {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
utility.makeResponse(ctx)
|
|
432
|
-
|
|
433
|
-
val entryCtx = Helpers.toMapAny(entry["ctx"])
|
|
434
|
-
if (entryCtx != null && ctx.result != null) {
|
|
435
|
-
entryCtx["result"] = fhMap(
|
|
436
|
-
"ok", ctx.result!!.ok,
|
|
437
|
-
"status", ctx.result!!.status,
|
|
438
|
-
"statusText", ctx.result!!.statusText,
|
|
439
|
-
"headers", ctx.result!!.headers,
|
|
440
|
-
"body", ctx.result!!.body,
|
|
441
|
-
)
|
|
442
|
-
}
|
|
483
|
+
runsection("makeResponse") { args ->
|
|
484
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
485
|
+
|
|
486
|
+
utility().makeResponse(ctx)
|
|
487
|
+
|
|
488
|
+
OmniResolver.omniSyncCtx(args[0], ctx)
|
|
443
489
|
|
|
444
490
|
null
|
|
445
491
|
}
|
|
@@ -448,7 +494,7 @@ class PrimaryUtilityTest {
|
|
|
448
494
|
@Test
|
|
449
495
|
fun makeResultBasic() {
|
|
450
496
|
val client = client()
|
|
451
|
-
val utility =
|
|
497
|
+
val utility = utility()
|
|
452
498
|
val ctx = makeTestFullCtx(client, utility)
|
|
453
499
|
ctx.spec = Spec(
|
|
454
500
|
fhMap(
|
|
@@ -480,7 +526,7 @@ class PrimaryUtilityTest {
|
|
|
480
526
|
@Test
|
|
481
527
|
fun makeResultNoSpec() {
|
|
482
528
|
val client = client()
|
|
483
|
-
val utility =
|
|
529
|
+
val utility = utility()
|
|
484
530
|
val ctx = makeTestFullCtx(client, utility)
|
|
485
531
|
ctx.spec = null
|
|
486
532
|
ctx.result = Result(fhMap("ok", true, "status", 200, "statusText", "OK", "headers", linkedMapOf<String, Any?>()))
|
|
@@ -496,7 +542,7 @@ class PrimaryUtilityTest {
|
|
|
496
542
|
@Test
|
|
497
543
|
fun makeResultNoResult() {
|
|
498
544
|
val client = client()
|
|
499
|
-
val utility =
|
|
545
|
+
val utility = utility()
|
|
500
546
|
val ctx = makeTestFullCtx(client, utility)
|
|
501
547
|
ctx.spec = Spec(fhMap("step", "start"))
|
|
502
548
|
ctx.result = null
|
|
@@ -511,76 +557,79 @@ class PrimaryUtilityTest {
|
|
|
511
557
|
|
|
512
558
|
@Test
|
|
513
559
|
fun makeSpecBasic() {
|
|
514
|
-
val setupOpts = getSpec(
|
|
560
|
+
val setupOpts = RunnerSupport.getSpec(run().spec, "makeSpec", "DEF", "setup", "a")
|
|
515
561
|
val specClient = ProjectNameSDK.testSDK(null, setupOpts)
|
|
516
562
|
val specUtility = specClient.getUtility()
|
|
517
563
|
|
|
518
|
-
|
|
519
|
-
val
|
|
520
|
-
val ctx = makeCtxFromMap(ctxmap, specClient, specUtility)
|
|
564
|
+
runsection("makeSpec") { args ->
|
|
565
|
+
val ctx = OmniResolver.omniCtx(args[0], specClient, specUtility)
|
|
521
566
|
ctx.options = specClient.optionsMap()
|
|
522
567
|
|
|
523
568
|
specUtility.makeSpec(ctx)
|
|
524
569
|
|
|
525
|
-
|
|
526
|
-
if (entryCtx != null && ctx.spec != null) {
|
|
527
|
-
entryCtx["spec"] = fhMap(
|
|
528
|
-
"base", ctx.spec!!.base,
|
|
529
|
-
"prefix", ctx.spec!!.prefix,
|
|
530
|
-
"suffix", ctx.spec!!.suffix,
|
|
531
|
-
"method", ctx.spec!!.method,
|
|
532
|
-
"params", ctx.spec!!.params,
|
|
533
|
-
"query", ctx.spec!!.query,
|
|
534
|
-
"headers", ctx.spec!!.headers,
|
|
535
|
-
"step", ctx.spec!!.step,
|
|
536
|
-
)
|
|
537
|
-
}
|
|
570
|
+
OmniResolver.omniSyncCtx(args[0], ctx)
|
|
538
571
|
|
|
539
572
|
null
|
|
540
573
|
}
|
|
541
574
|
}
|
|
542
575
|
|
|
576
|
+
// A minimal Entity: Context resolves the op through the Entity interface,
|
|
577
|
+
// and a literal {name: ...} map from the fixture is not one - entname
|
|
578
|
+
// would be "" and every lookup would miss, reporting point_no_points for
|
|
579
|
+
// all seven cases. TS reads the same field with getprop and accepts the
|
|
580
|
+
// plain map. (The java peer is PlEntity; the go peer is plEntity.)
|
|
581
|
+
private class PuEntity(override val name: String) : Entity {
|
|
582
|
+
override fun make(): Entity = PuEntity(name)
|
|
583
|
+
|
|
584
|
+
override fun data(vararg args: Any?): Any? = null
|
|
585
|
+
|
|
586
|
+
override fun match(vararg args: Any?): Any? = null
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
// Corpus-driven, like go/java: TS returns the error AS the value; kotlin
|
|
590
|
+
// throws SdkError. The corpus says `match: out: code` for both, so the
|
|
591
|
+
// error is normalised to a map carrying its code here rather than forking
|
|
592
|
+
// the fixture per language.
|
|
543
593
|
@Test
|
|
544
594
|
fun makePointBasic() {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
"transform", linkedMapOf<String, Any?>(),
|
|
559
|
-
)
|
|
560
|
-
ctx.op.points = mutableListOf(point)
|
|
595
|
+
runsection("makePoint") { args ->
|
|
596
|
+
var ctxmap = Helpers.toMapAny(args.getOrNull(0))
|
|
597
|
+
if (ctxmap == null) {
|
|
598
|
+
ctxmap = linkedMapOf()
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
val em = Helpers.toMapAny(ctxmap["entity"])
|
|
602
|
+
if (em != null) {
|
|
603
|
+
val name = if (em["name"] is String) em["name"] as String else ""
|
|
604
|
+
val swapped = LinkedHashMap<String, Any?>(ctxmap)
|
|
605
|
+
swapped["entity"] = PuEntity(name)
|
|
606
|
+
ctxmap = swapped
|
|
607
|
+
}
|
|
561
608
|
|
|
562
|
-
|
|
563
|
-
|
|
609
|
+
val ctx = OmniResolver.omniCtx(ctxmap, client(), utility())
|
|
610
|
+
try {
|
|
611
|
+
utility().makePoint(ctx)
|
|
612
|
+
} catch (e: SdkError) {
|
|
613
|
+
fhMap("code", e.code)
|
|
614
|
+
}
|
|
615
|
+
}
|
|
564
616
|
}
|
|
565
617
|
|
|
566
618
|
@Test
|
|
567
619
|
fun makeUrlBasic() {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
runset(getSpec(primary(), "makeUrl", "basic")) { entry ->
|
|
571
|
-
val ctxmap = Helpers.toMapAny(entry["ctx"])
|
|
572
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
620
|
+
runsection("makeUrl") { args ->
|
|
621
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
573
622
|
if (ctx.result == null) {
|
|
574
623
|
ctx.result = Result(linkedMapOf())
|
|
575
624
|
}
|
|
576
|
-
utility.makeUrl(ctx)
|
|
625
|
+
utility().makeUrl(ctx)
|
|
577
626
|
}
|
|
578
627
|
}
|
|
579
628
|
|
|
580
629
|
@Test
|
|
581
630
|
fun operatorBasic() {
|
|
582
|
-
|
|
583
|
-
val inm = Helpers.toMapAny(
|
|
631
|
+
runsection("operator") { args ->
|
|
632
|
+
val inm = Helpers.toMapAny(args.getOrNull(0))
|
|
584
633
|
val op = Operation(inm ?: linkedMapOf())
|
|
585
634
|
fhMap("entity", op.entity, "name", op.name, "input", op.input, "points", op.points)
|
|
586
635
|
}
|
|
@@ -588,38 +637,18 @@ class PrimaryUtilityTest {
|
|
|
588
637
|
|
|
589
638
|
@Test
|
|
590
639
|
fun paramBasic() {
|
|
591
|
-
|
|
592
|
-
val utility = client.getUtility()
|
|
593
|
-
runset(getSpec(primary(), "param", "basic")) { entry ->
|
|
594
|
-
val args = if (entry["args"] is List<*>) (entry["args"] as List<Any?>) else mutableListOf<Any?>()
|
|
640
|
+
runsection("param") { args ->
|
|
595
641
|
if (args.size < 2) {
|
|
596
|
-
return@
|
|
642
|
+
return@runsection null
|
|
597
643
|
}
|
|
598
644
|
|
|
599
|
-
|
|
600
|
-
if (ctxmap == null) {
|
|
601
|
-
ctxmap = linkedMapOf()
|
|
602
|
-
}
|
|
603
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
645
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
604
646
|
val paramdef = args[1]
|
|
605
647
|
|
|
606
|
-
val result = utility.param(ctx, paramdef)
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
val ctxMatch = Helpers.toMapAny(matchSpec["ctx"])
|
|
611
|
-
if (ctxMatch != null) {
|
|
612
|
-
var entryCtx = Helpers.toMapAny(entry["ctx"])
|
|
613
|
-
if (entryCtx == null) {
|
|
614
|
-
entryCtx = linkedMapOf()
|
|
615
|
-
entry["ctx"] = entryCtx
|
|
616
|
-
}
|
|
617
|
-
val specMatch = Helpers.toMapAny(ctxMatch["spec"])
|
|
618
|
-
if (specMatch != null && ctx.spec != null && specMatch["alias"] is Map<*, *>) {
|
|
619
|
-
entryCtx["spec"] = fhMap("alias", ctx.spec!!.alias)
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
}
|
|
648
|
+
val result = utility().param(ctx, paramdef)
|
|
649
|
+
|
|
650
|
+
// The spec alias mutation is what the match assertion reads.
|
|
651
|
+
OmniResolver.omniSyncCtx(args[0], ctx)
|
|
623
652
|
|
|
624
653
|
result
|
|
625
654
|
}
|
|
@@ -627,21 +656,16 @@ class PrimaryUtilityTest {
|
|
|
627
656
|
|
|
628
657
|
@Test
|
|
629
658
|
fun prepareAuthBasic() {
|
|
630
|
-
val setupOpts = getSpec(
|
|
659
|
+
val setupOpts = RunnerSupport.getSpec(run().spec, "prepareAuth", "DEF", "setup", "a")
|
|
631
660
|
val authClient = ProjectNameSDK.testSDK(null, setupOpts)
|
|
632
661
|
val authUtility = authClient.getUtility()
|
|
633
662
|
|
|
634
|
-
|
|
635
|
-
val
|
|
636
|
-
val ctx = makeCtxFromMap(ctxmap, authClient, authUtility)
|
|
637
|
-
RunnerSupport.fixctx(ctx, authClient)
|
|
663
|
+
runsection("prepareAuth") { args ->
|
|
664
|
+
val ctx = OmniResolver.omniCtx(args[0], authClient, authUtility)
|
|
638
665
|
|
|
639
666
|
authUtility.prepareAuth(ctx)
|
|
640
667
|
|
|
641
|
-
|
|
642
|
-
if (entryCtx != null && ctx.spec != null) {
|
|
643
|
-
entryCtx["spec"] = fhMap("headers", ctx.spec!!.headers)
|
|
644
|
-
}
|
|
668
|
+
OmniResolver.omniSyncCtx(args[0], ctx)
|
|
645
669
|
|
|
646
670
|
null
|
|
647
671
|
}
|
|
@@ -649,83 +673,66 @@ class PrimaryUtilityTest {
|
|
|
649
673
|
|
|
650
674
|
@Test
|
|
651
675
|
fun prepareBodyBasic() {
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
val ctxmap = Helpers.toMapAny(entry["ctx"])
|
|
656
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
657
|
-
RunnerSupport.fixctx(ctx, client)
|
|
658
|
-
utility.prepareBody(ctx)
|
|
676
|
+
runsection("prepareBody") { args ->
|
|
677
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
678
|
+
utility().prepareBody(ctx)
|
|
659
679
|
}
|
|
660
680
|
}
|
|
661
681
|
|
|
662
682
|
@Test
|
|
663
683
|
fun prepareHeadersBasic() {
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
val ctxmap = Helpers.toMapAny(entry["ctx"])
|
|
668
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
669
|
-
utility.prepareHeaders(ctx)
|
|
684
|
+
runsection("prepareHeaders") { args ->
|
|
685
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
686
|
+
utility().prepareHeaders(ctx)
|
|
670
687
|
}
|
|
671
688
|
}
|
|
672
689
|
|
|
673
690
|
@Test
|
|
674
691
|
fun prepareMethodBasic() {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
utility.prepareMethod(ctx)
|
|
692
|
+
runsection("prepareMethod") { args ->
|
|
693
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
694
|
+
// An op the API does not define resolves NO method; ts answers
|
|
695
|
+
// undefined there and kotlin answers null - both are "no value" to
|
|
696
|
+
// the corpus.
|
|
697
|
+
val method = utility().prepareMethod(ctx)
|
|
698
|
+
if (method.isNullOrEmpty()) null else method
|
|
681
699
|
}
|
|
682
700
|
}
|
|
683
701
|
|
|
684
702
|
@Test
|
|
685
703
|
fun prepareParamsBasic() {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
val ctxmap = Helpers.toMapAny(entry["ctx"])
|
|
690
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
691
|
-
utility.prepareParams(ctx)
|
|
704
|
+
runsection("prepareParams") { args ->
|
|
705
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
706
|
+
utility().prepareParams(ctx)
|
|
692
707
|
}
|
|
693
708
|
}
|
|
694
709
|
|
|
710
|
+
// Was two hand-written cases that had drifted out of the shared corpus
|
|
711
|
+
// (the preparePath fixture shipped as an empty `set: []`). Now driven by
|
|
712
|
+
// the corpus like every other section, so all ports assert the same
|
|
713
|
+
// separator/blank-segment behaviour.
|
|
695
714
|
@Test
|
|
696
715
|
fun preparePathBasic() {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
val utility = client.getUtility()
|
|
701
|
-
runset(getSpec(primary(), "preparePath", "basic")) { entry ->
|
|
702
|
-
val ctxmap = Helpers.toMapAny(entry["ctx"])
|
|
703
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
704
|
-
utility.preparePath(ctx)
|
|
716
|
+
runsection("preparePath") { args ->
|
|
717
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
718
|
+
utility().preparePath(ctx)
|
|
705
719
|
}
|
|
706
720
|
}
|
|
707
721
|
|
|
708
722
|
@Test
|
|
709
723
|
fun prepareQueryBasic() {
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
val ctxmap = Helpers.toMapAny(entry["ctx"])
|
|
714
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
715
|
-
utility.prepareQuery(ctx)
|
|
724
|
+
runsection("prepareQuery") { args ->
|
|
725
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
726
|
+
utility().prepareQuery(ctx)
|
|
716
727
|
}
|
|
717
728
|
}
|
|
718
729
|
|
|
719
730
|
@Test
|
|
720
731
|
fun resultBasicBasic() {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
runset(getSpec(primary(), "resultBasic", "basic")) { entry ->
|
|
724
|
-
val ctxmap = Helpers.toMapAny(entry["ctx"])
|
|
725
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
726
|
-
RunnerSupport.fixctx(ctx, client)
|
|
732
|
+
runsection("resultBasic") { args ->
|
|
733
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
727
734
|
|
|
728
|
-
val result = utility.resultBasic(ctx)
|
|
735
|
+
val result = utility().resultBasic(ctx)
|
|
729
736
|
|
|
730
737
|
val out = fhMap("status", result.status, "statusText", result.statusText)
|
|
731
738
|
if (result.err != null) {
|
|
@@ -738,18 +745,12 @@ class PrimaryUtilityTest {
|
|
|
738
745
|
|
|
739
746
|
@Test
|
|
740
747
|
fun resultBodyBasic() {
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
runset(getSpec(primary(), "resultBody", "basic")) { entry ->
|
|
744
|
-
val ctxmap = Helpers.toMapAny(entry["ctx"])
|
|
745
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
748
|
+
runsection("resultBody") { args ->
|
|
749
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
746
750
|
|
|
747
|
-
utility.resultBody(ctx)
|
|
751
|
+
utility().resultBody(ctx)
|
|
748
752
|
|
|
749
|
-
|
|
750
|
-
if (entryCtx != null && ctx.result != null) {
|
|
751
|
-
entryCtx["result"] = fhMap("body", ctx.result!!.body)
|
|
752
|
-
}
|
|
753
|
+
OmniResolver.omniSyncCtx(args[0], ctx)
|
|
753
754
|
|
|
754
755
|
null
|
|
755
756
|
}
|
|
@@ -757,18 +758,12 @@ class PrimaryUtilityTest {
|
|
|
757
758
|
|
|
758
759
|
@Test
|
|
759
760
|
fun resultHeadersBasic() {
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
runset(getSpec(primary(), "resultHeaders", "basic")) { entry ->
|
|
763
|
-
val ctxmap = Helpers.toMapAny(entry["ctx"])
|
|
764
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
761
|
+
runsection("resultHeaders") { args ->
|
|
762
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
765
763
|
|
|
766
|
-
utility.resultHeaders(ctx)
|
|
764
|
+
utility().resultHeaders(ctx)
|
|
767
765
|
|
|
768
|
-
|
|
769
|
-
if (entryCtx != null && ctx.result != null) {
|
|
770
|
-
entryCtx["result"] = fhMap("headers", ctx.result!!.headers)
|
|
771
|
-
}
|
|
766
|
+
OmniResolver.omniSyncCtx(args[0], ctx)
|
|
772
767
|
|
|
773
768
|
null
|
|
774
769
|
}
|
|
@@ -776,19 +771,13 @@ class PrimaryUtilityTest {
|
|
|
776
771
|
|
|
777
772
|
@Test
|
|
778
773
|
fun transformRequestBasic() {
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
runset(getSpec(primary(), "transformRequest", "basic")) { entry ->
|
|
782
|
-
val ctxmap = Helpers.toMapAny(entry["ctx"])
|
|
783
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
774
|
+
runsection("transformRequest") { args ->
|
|
775
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
784
776
|
|
|
785
|
-
val result = utility.transformRequest(ctx)
|
|
777
|
+
val result = utility().transformRequest(ctx)
|
|
786
778
|
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
val specMap = Helpers.toMapAny(entryCtx["spec"])
|
|
790
|
-
specMap?.put("step", ctx.spec!!.step)
|
|
791
|
-
}
|
|
779
|
+
// The step advance is what the match assertion reads.
|
|
780
|
+
OmniResolver.omniSyncCtx(args[0], ctx)
|
|
792
781
|
|
|
793
782
|
result
|
|
794
783
|
}
|
|
@@ -796,19 +785,12 @@ class PrimaryUtilityTest {
|
|
|
796
785
|
|
|
797
786
|
@Test
|
|
798
787
|
fun transformResponseBasic() {
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
runset(getSpec(primary(), "transformResponse", "basic")) { entry ->
|
|
802
|
-
val ctxmap = Helpers.toMapAny(entry["ctx"])
|
|
803
|
-
val ctx = makeCtxFromMap(ctxmap, client, utility)
|
|
788
|
+
runsection("transformResponse") { args ->
|
|
789
|
+
val ctx = OmniResolver.omniCtx(args[0], client(), utility())
|
|
804
790
|
|
|
805
|
-
val result = utility.transformResponse(ctx)
|
|
791
|
+
val result = utility().transformResponse(ctx)
|
|
806
792
|
|
|
807
|
-
|
|
808
|
-
if (entryCtx != null && ctx.spec != null) {
|
|
809
|
-
val specMap = Helpers.toMapAny(entryCtx["spec"])
|
|
810
|
-
specMap?.put("step", ctx.spec!!.step)
|
|
811
|
-
}
|
|
793
|
+
OmniResolver.omniSyncCtx(args[0], ctx)
|
|
812
794
|
|
|
813
795
|
result
|
|
814
796
|
}
|