diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-08-01 10:17:01 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-08-01 10:19:36 +0100 |
| commit | 24125936adb6c152cdb16d55f2639dd374dfee1d (patch) | |
| tree | 3e3c2005b05c24dc31291cdad874a1cf1af1436d /test_utils/src/lib.rs | |
| parent | 1f38d2a97e4c8b1d814c414343d1e118ce119f70 (diff) | |
feat(remote): `push` to all `clone` servers
initially we push to the first server, if successful update the
state event, then siliently push to the others and silently fail
Diffstat (limited to 'test_utils/src/lib.rs')
| -rw-r--r-- | test_utils/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs index 7a2bf35..2e7a4e8 100644 --- a/test_utils/src/lib.rs +++ b/test_utils/src/lib.rs | |||
| @@ -150,10 +150,10 @@ pub fn make_event_old_or_change_user( | |||
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | pub fn generate_repo_ref_event() -> nostr::Event { | 152 | pub fn generate_repo_ref_event() -> nostr::Event { |
| 153 | generate_repo_ref_event_with_git_server("git:://123.gitexample.com/test") | 153 | generate_repo_ref_event_with_git_server(vec!["git:://123.gitexample.com/test".to_string()]) |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | pub fn generate_repo_ref_event_with_git_server(git_server: &str) -> nostr::Event { | 156 | pub fn generate_repo_ref_event_with_git_server(git_servers: Vec<String>) -> nostr::Event { |
| 157 | // taken from test git_repo | 157 | // taken from test git_repo |
| 158 | // TODO - this may not be consistant across computers as it might take the | 158 | // TODO - this may not be consistant across computers as it might take the |
| 159 | // author and committer from global git config | 159 | // author and committer from global git config |
| @@ -171,7 +171,7 @@ pub fn generate_repo_ref_event_with_git_server(git_server: &str) -> nostr::Event | |||
| 171 | Tag::from_standardized(TagStandard::Description("example description".into())), | 171 | Tag::from_standardized(TagStandard::Description("example description".into())), |
| 172 | Tag::custom( | 172 | Tag::custom( |
| 173 | nostr::TagKind::Custom(std::borrow::Cow::Borrowed("clone")), | 173 | nostr::TagKind::Custom(std::borrow::Cow::Borrowed("clone")), |
| 174 | vec![git_server.to_string()], | 174 | git_servers, |
| 175 | ), | 175 | ), |
| 176 | Tag::custom( | 176 | Tag::custom( |
| 177 | nostr::TagKind::Custom(std::borrow::Cow::Borrowed("web")), | 177 | nostr::TagKind::Custom(std::borrow::Cow::Borrowed("web")), |