{"id":36420584,"url":"https://github.com/daflockinger/unitstack","last_synced_at":"2026-01-11T17:33:05.760Z","repository":{"id":52544315,"uuid":"103773173","full_name":"daflockinger/unitstack","owner":"daflockinger","description":"UnitStack is a stub/mock-service for unit-testing AWS implementations locally.","archived":false,"fork":false,"pushed_at":"2022-11-16T01:49:58.000Z","size":355,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-13T05:59:03.988Z","etag":null,"topics":["aws-sdk","mock","stub","test-framework","testing","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daflockinger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-16T18:05:58.000Z","updated_at":"2023-11-28T16:15:09.000Z","dependencies_parsed_at":"2023-01-23T08:01:02.078Z","dependency_job_id":null,"html_url":"https://github.com/daflockinger/unitstack","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/daflockinger/unitstack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daflockinger%2Funitstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daflockinger%2Funitstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daflockinger%2Funitstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daflockinger%2Funitstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daflockinger","download_url":"https://codeload.github.com/daflockinger/unitstack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daflockinger%2Funitstack/sbom","scorecard":{"id":316755,"data":{"date":"2025-08-11","repo":{"name":"github.com/daflockinger/unitstack","commit":"68d1b0109b01eafe42733000f9645f4b50774941"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 25 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-h46c-h94j-95f3","Warn: Project is vulnerable to: GHSA-wf8f-6423-gfxg","Warn: Project is vulnerable to: GHSA-3x8x-79m2-3w2w","Warn: Project is vulnerable to: GHSA-57j2-w4cx-62h2","Warn: Project is vulnerable to: GHSA-jjjh-jjxp-wpff","Warn: Project is vulnerable to: GHSA-rgv9-q543-rqg4","Warn: Project is vulnerable to: GHSA-3f7h-mf4q-vrm4","Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-78wr-2p64-hpwj","Warn: Project is vulnerable to: GHSA-gwrp-pvrq-jmwv","Warn: Project is vulnerable to: GHSA-269g-pwp5-87pp","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T00:21:58.534Z","repository_id":52544315,"created_at":"2025-08-18T00:21:58.534Z","updated_at":"2025-08-18T00:21:58.534Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28315879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-sdk","mock","stub","test-framework","testing","testing-tools"],"created_at":"2026-01-11T17:33:05.072Z","updated_at":"2026-01-11T17:33:05.755Z","avatar_url":"https://github.com/daflockinger.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UnitStack\n[![Build Status](https://travis-ci.org/daflockinger/unitstack.svg?branch=master)](https://travis-ci.org/daflockinger/unitstack)\n\nUnitstack provides a very fast and easy way to test your (AWS) cloud application in a simple unit-test.\nIt consists of mocks/stubs of some of the services provided by the Amazon Web Services:\n* **SNS** (Simple Notification Service)\n* **SQS** (Simple Queue Service)\n* **S3** (Simple Storage Service)\n* ... more services will be added by time!\n\nUnitstack's stub services behave like the real ones. You get real responses, \ne.g. when you send messages to your SQS, and fetch messages later, you'll receive exactly \nthe messages you sent. \nYou can also verify that the correct data is sent by accessing the service data \nstored by UnitStack (e.g. Topics, Buckets with Objects and their file contents,...).\n\n## Getting Started\n\n### Setup\nJust add the dependency to your pom.xml:\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.flockinger\u003c/groupId\u003e\n    \u003cartifactId\u003eunitstack\u003c/artifactId\u003e\n    \u003cversion\u003e0.1.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Example Implementation\n\nTo use UnitStack in your unit tests:\n* extend your test class with the ``UnitStackTest`` class. \n* initiate the service mock by calling the ``mockSns`` method with either\nempty or specific mock parameters\n* point the AWS client to the mock endpoint by using the\n``UNIT_STACK_URL`` and the correct service port, in this case ``SNS_PORT``.\n\nAfter that, your're ready to go with unit-testing your AWS implementation locally.\nHere's the example:\n```\npublic class ExampleSnsTest extends UnitStackTest {\n\n  private AmazonSNSAsync sns;\n\n  @Before\n  public void setup() {\n    mockS3(new MockParameters());\n    EndpointConfiguration endpoint =\n        new EndpointConfiguration(UNIT_STACK_URL + \":\" + SNS_PORT, Region.EU_Frankfurt.name());\n    AWSCredentials credentials = new BasicAWSCredentials(\"key\", \"secret\");\n    AWSCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(credentials);\n\n    sns = AmazonSNSAsyncClientBuilder.standard().withEndpointConfiguration(endpoint)\n        .withCredentials(credentialsProvider).build();\n  } \n\n  @Test\n  public void testPublish_shouldPublishTheMessage() {\n    CreateTopicResult topicResult = sns.createTopic(new CreateTopicRequest().withName(\"important-topic\"));\n    \n    PublishRequest publishReq = new PublishRequest()\n        .withMessage(\"{\\\"state\\\":\\\"liquid\\\",\\\"color\\\":\\\"black\\\",\\\"waking-up\\\":true}\")\n        .withMessageStructure(\"json\")\n        .withSubject(\"eeffoc\")\n        .withTopicArn(topicResult.getTopicArn());\n    \n    PublishResult publishResult = sns.publish(publishReq);\n    assertNotNull(\"verify message id\",publishResult.getMessageId());\n    \n    Topic topic = getSnsTopics().get(topicResult.getTopicArn());\n    assertEquals(\"verify correct message count\", 1, topic.getMessages().size());\n    assertEquals(\"verify message subject\",\"eeffoc\",topic.getMessages().get(0).getSubject());\n    assertEquals(\"verify message body\",\"{\\\"state\\\":\\\"liquid\\\",\\\"color\\\":\\\"black\\\",\\\"waking-up\\\":true}\",topic.getMessages().get(0).getBody());\n    assertEquals(\"verify message structure\",\"json\",topic.getMessages().get(0).getStructure());\n  }\n}\n```\n\n##### S3 implementation requirements\n\nIf your system has IPv4 routing, you need to create hosts for the mocked S3 buckets in your ``/etc/hosts`` file. \nFor example if your tests contain a bucket with the name 'specialbucket', the following line must be added\nat the end of your ``/etc/hosts`` file:\n```\n127.0.0.1       specialbucket.localhost\n```\n\n### Development on UnitStack\n\nThe UnitStack tests should run fine out of the box if your system has an IPv6 routing, \notherwise you will probably need to run the ``createS3MockHosts.sh`` script in the base directory of the project.\nIt creates the necessary mock-hosts for the S3 tests (since S3 expects subdomains with the bucketname, e.g.\ntest-bucket.localhost) that are redirected to your localhost (127.0.0.1).\n\n## Built With\n\n* [WireMock](https://github.com/tomakehurst/wiremock) - Responsible for creating/handling the stub webservices\n* [jackson-databind](https://github.com/FasterXML/jackson-databind) - Handling all the JSON and XML stuff\n* [AWS-SDK](https://github.com/aws/aws-sdk-java) - UnitStack is tested against the latest version of the AWS SDK\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](https://github.com/daflockinger/unitstack/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Versioning\n\n[SemVer](http://semver.org/) is used for versioning. \n\n## Authors\n\n* **Florian Mitterbauer** - *Initial work* - [daflockinger](https://github.com/daflockinger)\n\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](https://github.com/daflockinger/unitstack/blob/master/LICENSE) file for details\n\n## Acknowledgments\nThe project was very much inspired by [LocalStack](https://github.com/localstack/localstack) and my need for a simple and fast \ntool to unit test AWS implementations without the hassle of connecting it to the real AWS services for testing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaflockinger%2Funitstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaflockinger%2Funitstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaflockinger%2Funitstack/lists"}