---
name: "test requirement 2bdc4682-308f-42ae-87cf-847f62f64e36"
attributedTo:
- name: bengo
  url: https://bengo.is
- name: codenamedmitri  
status: draft
"@context":
- https://www.w3.org/ns/activitystreams
---

# test requirement 2bdc4682-308f-42ae-87cf-847f62f64e36

> If an Activity is submitted with a value in the id property, servers MUST ignore this and generate a new id for the Activity. 
-- [requirement 2bdc4682-308f-42ae-87cf-847f62f64e36](https://activitypub-testing-website.socialweb.coop/2bdc4682-308f-42ae-87cf-847f62f64e36)

## Acceptance Criteria

* There is at least one test rule that tests that requirement
* the test should be linked to the requirement in such a way that the test shows up in this section: https://activitypub-testing-website.socialweb.coop/conformance/requirements/tests/#2bdc4682-308f-42ae-87cf-847f62f64e36

## Plan

* [x] add src/activitypub-tests/post-outbox-server-overwrites-id-property/testCase.js
* [x] add src/activitypub-tests/post-outbox-server-overwrites-id-property/testCase.test.js
* [x] get that to render ^ in /website/ from js
    * http://localhost:8081/test-cases/post-outbox-server-overwrites-id-property
    * also the test is linked to from the requirement section in http://localhost:8081/conformance/requirements/tests/#2bdc4682-308f-42ae-87cf-847f62f64e36
* [x] add requirementReference to js and website rendering
* [x] add test case with mock http server that passes test
* [x] add test case with mock http server that fails test
* [x] write/render test targets derived from input
* [x] write/render expectations (implemented by the `run` function)
* [x] test with authorization input
* [x] what's missing?
  * [x] add passed test case
  * [x] add inapplicable test case
  * punt on adding failed case, because I think it would require contriving/hosting an example which feels not important atm compared to adding tests
* [x] get 1 coauthor
* [x] test one implementation
  * https://socialweb.coop/outbox passes
* [ ] test a second implementation

## Testing Implementations

### onepage.pub

```shell
⚡ activitypub-testing run test \              
  --slug post-outbox-server-overwrites-id-property \                 
  --input.outbox='https://onepage.pub/orderedcollection/VXH9LQd6l8pm015WyWyA7' \
  --input.authorization="Bearer `cat ~/.activitypub-testing/bengo_onepagepub_token`"
{
  "type": [
    "Assertion"
  ],
  "result": {
    "outcome": "passed"
  },
  "test": {
    "slug": "post-outbox-server-overwrites-id-property",
    "description": "A Test Rule for an ActivityPub Requirement",
    "name": "post outbox server must overwrite id property",
    "id": "urn:uuid:30018b5d-699a-45a9-a623-1f09a36cf0a6",
    "requirementReference": [
      {
        "id": "urn:uuid:2bdc4682-308f-42ae-87cf-847f62f64e36",
        "url": "https://activitypub-testing-website.socialweb.coop/2bdc4682-308f-42ae-87cf-847f62f64e36"
      }
    ]
  },
  "input": {
    "outbox": "https://onepage.pub/orderedcollection/VXH9LQd6l8pm015WyWyA7",
    "authorization": {
      "@type": [
        "https://activitypub-testing.socialweb.coop/ns/HiddenInTestResults"
      ]
    }
  },
  "@context": [
    "https://socialweb.coop/ns/testing/context.json",
    "https://www.w3.org/ns/activitystreams"
  ]
}
```

### socialweb.coop

```shell
⚡ activitypub-testing run test --slug post-outbox-server-overwrites-id-property --input.outbox=https://socialweb.coop/outbox
{
  "type": [
    "Assertion"
  ],
  "result": {
    "outcome": "passed"
  },
  "test": {
    "slug": "post-outbox-server-overwrites-id-property",
    "description": "A Test Rule for an ActivityPub Requirement",
    "name": "post outbox server must overwrite id property",
    "id": "urn:uuid:30018b5d-699a-45a9-a623-1f09a36cf0a6",
    "requirementReference": [
      {
        "id": "urn:uuid:2bdc4682-308f-42ae-87cf-847f62f64e36",
        "url": "https://activitypub-testing-website.socialweb.coop/2bdc4682-308f-42ae-87cf-847f62f64e36"
      }
    ]
  },
  "input": {
    "outbox": "https://socialweb.coop/outbox"
  },
  "@context": [
    "https://socialweb.coop/ns/testing/context.json",
    "https://www.w3.org/ns/activitystreams"
  ]
}
```

