diff options
Diffstat (limited to 'grasp-audit/src/fixtures.rs')
| -rw-r--r-- | grasp-audit/src/fixtures.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/grasp-audit/src/fixtures.rs b/grasp-audit/src/fixtures.rs index a15bd79..62f93e8 100644 --- a/grasp-audit/src/fixtures.rs +++ b/grasp-audit/src/fixtures.rs | |||
| @@ -676,7 +676,7 @@ impl<'a> TestContext<'a> { | |||
| 676 | .to_string(); | 676 | .to_string(); |
| 677 | 677 | ||
| 678 | // Create state announcement with deterministic commit hash | 678 | // Create state announcement with deterministic commit hash |
| 679 | let base_time = Timestamp::now().as_u64(); | 679 | let base_time = Timestamp::now().as_secs(); |
| 680 | let older_timestamp = Timestamp::from(base_time - 10); // 10 seconds ago | 680 | let older_timestamp = Timestamp::from(base_time - 10); // 10 seconds ago |
| 681 | 681 | ||
| 682 | // Tag format: ["refs/heads/main", "<commit_hash>"] | 682 | // Tag format: ["refs/heads/main", "<commit_hash>"] |
| @@ -712,7 +712,7 @@ impl<'a> TestContext<'a> { | |||
| 712 | .to_string(); | 712 | .to_string(); |
| 713 | 713 | ||
| 714 | // Create PR event 1 second in the past | 714 | // Create PR event 1 second in the past |
| 715 | let base_time = Timestamp::now().as_u64(); | 715 | let base_time = Timestamp::now().as_secs(); |
| 716 | let pr_timestamp = Timestamp::from(base_time - 1); | 716 | let pr_timestamp = Timestamp::from(base_time - 1); |
| 717 | 717 | ||
| 718 | // Build NIP-34 PR event (kind 1618) | 718 | // Build NIP-34 PR event (kind 1618) |
| @@ -755,7 +755,7 @@ impl<'a> TestContext<'a> { | |||
| 755 | .to_string(); | 755 | .to_string(); |
| 756 | 756 | ||
| 757 | // Create PR event 1 second in the past | 757 | // Create PR event 1 second in the past |
| 758 | let base_time = Timestamp::now().as_u64(); | 758 | let base_time = Timestamp::now().as_secs(); |
| 759 | let pr_timestamp = Timestamp::from(base_time - 1); | 759 | let pr_timestamp = Timestamp::from(base_time - 1); |
| 760 | 760 | ||
| 761 | // Build NIP-34 PR event (kind 1618) | 761 | // Build NIP-34 PR event (kind 1618) |
| @@ -883,7 +883,7 @@ impl<'a> TestContext<'a> { | |||
| 883 | let repo_id = self.extract_repo_id(&repo)?; | 883 | let repo_id = self.extract_repo_id(&repo)?; |
| 884 | 884 | ||
| 885 | // Build state event | 885 | // Build state event |
| 886 | let base_time = Timestamp::now().as_u64(); | 886 | let base_time = Timestamp::now().as_secs(); |
| 887 | let older_timestamp = Timestamp::from(base_time - 10); // 10 seconds ago | 887 | let older_timestamp = Timestamp::from(base_time - 10); // 10 seconds ago |
| 888 | 888 | ||
| 889 | let state_event = self | 889 | let state_event = self |
| @@ -1036,7 +1036,7 @@ impl<'a> TestContext<'a> { | |||
| 1036 | let repo = self.get_cached_dependency(FixtureKind::ValidRepo)?; | 1036 | let repo = self.get_cached_dependency(FixtureKind::ValidRepo)?; |
| 1037 | 1037 | ||
| 1038 | // Build maintainer's state event (state event ONLY - no announcement) | 1038 | // Build maintainer's state event (state event ONLY - no announcement) |
| 1039 | let base_time = Timestamp::now().as_u64(); | 1039 | let base_time = Timestamp::now().as_secs(); |
| 1040 | let maintainer_timestamp = Timestamp::from(base_time - 5); // 5 seconds ago (more recent than owner's state) | 1040 | let maintainer_timestamp = Timestamp::from(base_time - 5); // 5 seconds ago (more recent than owner's state) |
| 1041 | 1041 | ||
| 1042 | let maintainer_state_event = self | 1042 | let maintainer_state_event = self |
| @@ -1187,7 +1187,7 @@ impl<'a> TestContext<'a> { | |||
| 1187 | self.client.send_event(maintainer_announcement).await?; | 1187 | self.client.send_event(maintainer_announcement).await?; |
| 1188 | 1188 | ||
| 1189 | // Build recursive maintainer's state event | 1189 | // Build recursive maintainer's state event |
| 1190 | let base_time = Timestamp::now().as_u64(); | 1190 | let base_time = Timestamp::now().as_secs(); |
| 1191 | let recursive_maintainer_timestamp = Timestamp::from(base_time - 2); // 2 seconds ago (most recent) | 1191 | let recursive_maintainer_timestamp = Timestamp::from(base_time - 2); // 2 seconds ago (most recent) |
| 1192 | 1192 | ||
| 1193 | let recursive_maintainer_state_event = self | 1193 | let recursive_maintainer_state_event = self |
| @@ -1338,7 +1338,7 @@ impl<'a> TestContext<'a> { | |||
| 1338 | // ============================================================ | 1338 | // ============================================================ |
| 1339 | // Use the same commit hash that's already pushed to the relay | 1339 | // Use the same commit hash that's already pushed to the relay |
| 1340 | // but point HEAD to develop branch instead of main | 1340 | // but point HEAD to develop branch instead of main |
| 1341 | let base_time = Timestamp::now().as_u64(); | 1341 | let base_time = Timestamp::now().as_secs(); |
| 1342 | let develop_timestamp = Timestamp::from(base_time - 1); // 1 second ago (most recent) | 1342 | let develop_timestamp = Timestamp::from(base_time - 1); // 1 second ago (most recent) |
| 1343 | 1343 | ||
| 1344 | let develop_state_event = self | 1344 | let develop_state_event = self |