(binary: &Path, root: &Path)
| 59 | } |
| 60 | } |
| 61 | fn run(binary: &Path, root: &Path) -> Result<Value> { |
| 62 | let config = root.join("isolated-config"); |
| 63 | fs::create_dir_all(&config)?; |
| 64 | // Standalone process, before the listener/runtime threads are started. |
| 65 | // Direct Rust fixture operations must use the same isolated identity/config. |
| 66 | std::env::set_var("ATOMIC_CONFIG_DIR", &config); |
| 67 | let source = root.join("source"); |
| 68 | let receiver = root.join("receiver"); |
| 69 | let cold = root.join("cold-after-delete"); |
| 70 | let peer = peer::Peer::start(&root.join("wire-objects"))?; |
| 71 | let url = peer.url(); |
| 72 | // Fixture-only signing identity; stored outside every replicated repository. |
| 73 | cli( |
| 74 | binary, |
| 75 | root, |
| 76 | &config, |
| 77 | &["identity", "new", "acceptance", "--set-default"], |
| 78 | )?; |
| 79 | let fixture = fixture::create(binary, &source, &config)?; |
| 80 | cli( |
| 81 | binary, |
| 82 | &source, |
| 83 | &config, |
| 84 | &["tag", "create", "acceptance-tag"], |
| 85 | )?; |
| 86 | let mut report = json!({"test_kind":"real CLI push/pull plus fresh receiver reconstruction", |
| 87 | "production_server_tested":false,"protocol_fixture_policy":"trusted sender; CAS refs; first-write immutable objects; not production authorization or edge cleanup", |
| 88 | "production_server_blocker":"atomic-storage requires local ^0.16.1 crates; checkout is 0.19.1. Docker unavailable.", |
| 89 | "root":root,"remote":url,"cli":binary,"changes":{ "feature":fixture.change.to_base32() }}); |
| 90 | record( |
| 91 | &mut report, |
| 92 | "source_before_push", |
| 93 | observe::repository(&source, &fixture)?, |
| 94 | ); |
| 95 | record( |
| 96 | &mut report, |
| 97 | "source_backend", |
| 98 | observe::backend(&source, &fixture)?, |
| 99 | ); |
| 100 | record( |
| 101 | &mut report, |
| 102 | "first_push", |
| 103 | cli( |
| 104 | binary, |
| 105 | &source, |
| 106 | &config, |
| 107 | &["push", &url, "--from-view", "feature"], |
| 108 | )?, |
| 109 | ); |
| 110 | record(&mut report, "wire_after_first_push", peer.inventory()); |
| 111 | fresh(binary, &receiver, &config, &url, "feature")?; |
| 112 | record( |
| 113 | &mut report, |
| 114 | "receiver_after_pull", |
| 115 | observe::repository(&receiver, &fixture)?, |
| 116 | ); |
| 117 | record( |
| 118 | &mut report, |
no test coverage detected