Commit 66a4d2de authored by Brad King's avatar Brad King

data: update to 9.2 data entities

parent 936709be
{"due_date": null, "downvotes": 0, "subscribed": true, "web_url": "https://gitlab.kitware.com/utils/rust-gitlab/issues/5", "description": "The workflow currently requires that the robot be able to register itself as a webhook for new projects. An API needs added for this.\n\nCc: @brad.king", "confidential": false, "title": "Add project hook APIs", "created_at": "2016-10-04T14:59:37.178-04:00", "labels": [], "updated_at": "2016-10-04T16:18:57.519-04:00", "iid": 5, "state": "closed", "user_notes_count": 0, "assignee": {"username": "ben.boeckel", "web_url": "https://gitlab.kitware.com/ben.boeckel", "name": "Ben Boeckel", "state": "active", "avatar_url": "https://secure.gravatar.com/avatar/2f5f7e99190174edb5a2f66b8653b0b2?s=80&d=identicon", "id": 13}, "author": {"username": "ben.boeckel", "web_url": "https://gitlab.kitware.com/ben.boeckel", "name": "Ben Boeckel", "state": "active", "avatar_url": "https://secure.gravatar.com/avatar/2f5f7e99190174edb5a2f66b8653b0b2?s=80&d=identicon", "id": 13}, "milestone": null, "upvotes": 0, "project_id": 855, "id": 69075}
{"due_date": null, "downvotes": 0, "subscribed": false, "web_url": "https://gitlab.kitware.com/utils/rust-gitlab/issues/5", "description": "The workflow currently requires that the robot be able to register itself as a webhook for new projects. An API needs added for this.\n\nCc: @brad.king", "confidential": false, "title": "Add project hook APIs", "created_at": "2016-10-04T14:59:37.178-04:00", "labels": [], "updated_at": "2016-10-04T16:18:57.519-04:00", "iid": 5, "state": "closed", "user_notes_count": 0, "assignee": {"username": "ben.boeckel", "web_url": "https://gitlab.kitware.com/ben.boeckel", "name": "Ben Boeckel", "state": "active", "avatar_url": "https://secure.gravatar.com/avatar/2f5f7e99190174edb5a2f66b8653b0b2?s=80&d=identicon", "id": 13}, "author": {"username": "ben.boeckel", "web_url": "https://gitlab.kitware.com/ben.boeckel", "name": "Ben Boeckel", "state": "active", "avatar_url": "https://secure.gravatar.com/avatar/2f5f7e99190174edb5a2f66b8653b0b2?s=80&d=identicon", "id": 13}, "milestone": null, "upvotes": 0, "project_id": 855, "id": 69075}
{"lfs_enabled": true, "request_access_enabled": true, "forks_count": 3, "only_allow_merge_if_all_discussions_are_resolved": null, "container_registry_enabled": true, "web_url": "https://gitlab.kitware.com/utils/rust-gitlab", "wiki_enabled": true, "public_builds": true, "id": 855, "merge_requests_enabled": true, "archived": false, "snippets_enabled": false, "http_url_to_repo": "https://gitlab.kitware.com/utils/rust-gitlab.git", "namespace": {"path": "utils", "kind": "group", "id": 498, "full_path": "utils", "name": "Utils"}, "star_count": 0, "avatar_url": null, "issues_enabled": true, "path_with_namespace": "utils/rust-gitlab", "public": true, "shared_with_groups": [], "description": "Rust library for communicating with a Gitlab instance.", "default_branch": "master", "only_allow_merge_if_build_succeeds": false, "ssh_url_to_repo": "git@gitlab.kitware.com:utils/rust-gitlab.git", "path": "rust-gitlab", "visibility_level": 20, "permissions": {"group_access": {"notification_level": 3, "access_level": 50}, "project_access": null}, "open_issues_count": 0, "last_activity_at": "2017-05-05T15:37:36.901-04:00", "name": "rust-gitlab", "name_with_namespace": "Utils / rust-gitlab", "created_at": "2016-06-29T13:35:12.495-04:00", "builds_enabled": false, "creator_id": 13, "shared_runners_enabled": true, "tag_list": []}
{"lfs_enabled": true, "request_access_enabled": true, "forks_count": 4, "only_allow_merge_if_all_discussions_are_resolved": null, "container_registry_enabled": true, "web_url": "https://gitlab.kitware.com/utils/rust-gitlab", "wiki_enabled": true, "public_builds": true, "id": 855, "merge_requests_enabled": true, "archived": false, "snippets_enabled": false, "http_url_to_repo": "https://gitlab.kitware.com/utils/rust-gitlab.git", "namespace": {"path": "utils", "kind": "group", "id": 498, "full_path": "utils", "name": "Utils"}, "star_count": 0, "avatar_url": null, "issues_enabled": true, "path_with_namespace": "utils/rust-gitlab", "public": true, "shared_with_groups": [], "description": "Rust library for communicating with a Gitlab instance.", "default_branch": "master", "only_allow_merge_if_build_succeeds": false, "ssh_url_to_repo": "git@gitlab.kitware.com:utils/rust-gitlab.git", "path": "rust-gitlab", "visibility_level": 20, "permissions": {"group_access": {"notification_level": 3, "access_level": 50}, "project_access": null}, "open_issues_count": 0, "last_activity_at": "2017-05-24T15:40:09.941-04:00", "name": "rust-gitlab", "name_with_namespace": "Utils / rust-gitlab", "created_at": "2016-06-29T13:35:12.495-04:00", "builds_enabled": false, "creator_id": 13, "shared_runners_enabled": true, "tag_list": []}
{"name": "master", "developers_can_merge": false, "protected": true, "developers_can_push": false, "commit": {"committer_email": "kwrobot@kitware.com", "short_id": "1e402a90", "title": "Merge topic 'mod-crates'", "author_email": "brad.king@kitware.com", "committer_name": "Kitware Robot", "created_at": "2017-04-24T11:13:28.000-04:00", "author_name": "Brad King", "parent_ids": ["7cb21fade3321158cb5dbf85c41ed516889ff811", "19357a8271c394d9a8a01bbf9bc3c7b39c2820cb"], "committed_date": "2017-04-24T11:13:28.000-04:00", "message": "Merge topic 'mod-crates'\n\n19357a82 crates: add a module for importing crates\n\nAcked-by: Kitware Robot <kwrobot@kitware.com>\nMerge-request: !86\n", "authored_date": "2017-04-24T15:13:24.000+00:00", "id": "1e402a90a98fb60455a9be6d33da872ebd63f184"}, "merged": false}
{"name": "master", "developers_can_merge": false, "protected": true, "developers_can_push": false, "commit": {"committer_email": "kwrobot@kitware.com", "short_id": "936709be", "title": "Merge topic 'gitlab-9.2-update'", "author_email": "ben.boeckel@kitware.com", "committer_name": "Kitware Robot", "created_at": "2017-05-24T15:40:14.000-04:00", "author_name": "Ben Boeckel", "parent_ids": ["b67a5f29bccd11ce94c267538c93c519dae0a1ed", "861eb484822c41220ff7adfee3b95aa10353414f"], "committed_date": "2017-05-24T15:40:14.000-04:00", "message": "Merge topic 'gitlab-9.2-update'\n\n861eb484 types: update for 9.2 changes\n\nAcked-by: Kitware Robot <kwrobot@kitware.com>\nReviewed-by: Ben Boeckel <ben.boeckel@kitware.com>\nMerge-request: !91\n", "authored_date": "2017-05-24T19:40:09.000+00:00", "id": "936709be30f9b51bb7be316187641068efa765a9"}, "merged": false}
{"username": "kwrobot", "bio": "", "web_url": "https://gitlab.kitware.com/kwrobot", "name": "Kitware Robot", "twitter": "", "created_at": "2015-02-26T10:58:34.670-05:00", "linkedin": "", "state": "active", "avatar_url": "https://secure.gravatar.com/avatar/9ddcd45fcb89d966aab95b1f1002f84c?s=80&d=identicon", "is_admin": true, "location": null, "skype": "", "organization": null, "id": 11, "website_url": ""}
{"two_factor_enabled": true, "can_create_project": true, "confirmed_at": "2015-02-26T10:58:34.660-05:00", "twitter": "", "linkedin": "", "color_scheme_id": 4, "web_url": "https://gitlab.kitware.com/kwrobot", "skype": "", "identities": [], "id": 11, "projects_limit": 50, "current_sign_in_at": "2017-06-05T14:46:29.512-04:00", "state": "active", "location": null, "email": "kwrobot@kitware.com", "website_url": "", "username": "kwrobot", "bio": "", "last_sign_in_at": "2017-04-27T10:59:16.823-04:00", "last_activity_on": "2017-06-06", "external": false, "name": "Kitware Robot", "can_create_group": true, "created_at": "2015-02-26T10:58:34.670-05:00", "avatar_url": "https://secure.gravatar.com/avatar/9ddcd45fcb89d966aab95b1f1002f84c?s=80&d=identicon", "organization": null}
{"two_factor_enabled": true, "can_create_project": true, "confirmed_at": "2015-02-26T12:23:28.693-05:00", "twitter": "", "linkedin": "", "color_scheme_id": 2, "web_url": "https://gitlab.kitware.com/ben.boeckel", "skype": "", "identities": [], "id": 13, "projects_limit": 50, "current_sign_in_at": "2017-05-11T13:11:30.649-04:00", "state": "active", "location": null, "email": "ben.boeckel@kitware.com", "website_url": "", "username": "ben.boeckel", "bio": null, "last_sign_in_at": "2017-05-11T10:37:30.977-04:00", "is_admin": false, "external": false, "organization": null, "name": "Ben Boeckel", "can_create_group": true, "created_at": "2015-02-26T12:23:28.730-05:00", "avatar_url": "https://secure.gravatar.com/avatar/2f5f7e99190174edb5a2f66b8653b0b2?s=80&d=identicon", "last_activity_on": "2017-05-10"}
{"two_factor_enabled": true, "can_create_project": true, "confirmed_at": "2015-02-26T10:58:34.660-05:00", "twitter": "", "linkedin": "", "color_scheme_id": 4, "web_url": "https://gitlab.kitware.com/kwrobot", "skype": "", "identities": [], "id": 11, "projects_limit": 50, "current_sign_in_at": "2017-06-05T14:46:29.512-04:00", "state": "active", "location": null, "email": "kwrobot@kitware.com", "website_url": "", "username": "kwrobot", "bio": "", "last_sign_in_at": "2017-04-27T10:59:16.823-04:00", "last_activity_on": "2017-06-06", "external": false, "name": "Kitware Robot", "can_create_group": true, "created_at": "2015-02-26T10:58:34.670-05:00", "avatar_url": "https://secure.gravatar.com/avatar/9ddcd45fcb89d966aab95b1f1002f84c?s=80&d=identicon", "organization": null}
......@@ -187,7 +187,7 @@ fn test_read_issue_reference() {
} else {
panic!("expected to have an assignee for the issue");
}
assert_eq!(issue.subscribed, true);
assert_eq!(issue.subscribed, false);
assert_eq!(issue.user_notes_count, 0);
assert_eq!(issue.upvotes, 0);
assert_eq!(issue.downvotes, 0);
......@@ -327,8 +327,8 @@ fn test_read_project() {
UTC.ymd(2016, 6, 29)
.and_hms_milli(17, 35, 12, 495));
assert_eq!(project.last_activity_at,
UTC.ymd(2017, 5, 5)
.and_hms_milli(19, 37, 36, 901));
UTC.ymd(2017, 5, 24)
.and_hms_milli(19, 40, 9, 941));
assert_eq!(project.shared_runners_enabled, true);
assert_eq!(project.lfs_enabled, true);
assert_eq!(project.creator_id, UserId::new(13));
......@@ -341,7 +341,7 @@ fn test_read_project() {
assert!(project.forked_from_project.is_none());
assert_eq!(project.avatar_url, None);
assert_eq!(project.star_count, 0);
assert_eq!(project.forks_count, 3);
assert_eq!(project.forks_count, 4);
assert_eq!(project.open_issues_count, Some(0));
assert_eq!(project.public_builds, true);
assert!(project.shared_with_groups.is_empty());
......@@ -393,32 +393,30 @@ fn test_read_repo_branch() {
assert_eq!(repo_branch.name, "master");
if let Some(ref commit) = repo_branch.commit {
assert_eq!(commit.author_email, "brad.king@kitware.com");
assert_eq!(commit.author_name, "Brad King");
assert_eq!(commit.author_email, "ben.boeckel@kitware.com");
assert_eq!(commit.author_name, "Ben Boeckel");
assert_eq!(commit.authored_date,
UTC.ymd(2017, 4, 24)
.and_hms_milli(15, 13, 24, 0));
UTC.ymd(2017, 5, 24)
.and_hms_milli(19, 40, 9, 0));
assert_eq!(commit.committed_date,
UTC.ymd(2017, 4, 24)
.and_hms_milli(15, 13, 28, 0));
UTC.ymd(2017, 5, 24)
.and_hms_milli(19, 40, 14, 0));
assert_eq!(commit.created_at,
UTC.ymd(2017, 4, 24)
.and_hms_milli(15, 13, 28, 0));
UTC.ymd(2017, 5, 24)
.and_hms_milli(19, 40, 14, 0));
assert_eq!(commit.committer_email, "kwrobot@kitware.com");
assert_eq!(commit.committer_name, "Kitware Robot");
assert_eq!(commit.id,
ObjectId::new("1e402a90a98fb60455a9be6d33da872ebd63f184"));
assert_eq!(commit.short_id, ObjectId::new("1e402a90"));
assert_eq!(commit.title, "Merge topic 'mod-crates'");
ObjectId::new("936709be30f9b51bb7be316187641068efa765a9"));
assert_eq!(commit.short_id, ObjectId::new("936709be"));
assert_eq!(commit.title, "Merge topic 'gitlab-9.2-update'");
assert_eq!(commit.message,
"Merge topic 'mod-crates'\n\n19357a82 crates: add a module for importing \
crates\n\nAcked-by: Kitware Robot <kwrobot@kitware.com>\nMerge-request: \
!86\n");
"Merge topic 'gitlab-9.2-update'\n\n861eb484 types: update for 9.2 \
changes\n\nAcked-by: Kitware Robot <kwrobot@kitware.com>\nReviewed-by: Ben \
Boeckel <ben.boeckel@kitware.com>\nMerge-request: !91\n");
assert_eq!(commit.parent_ids,
vec![
ObjectId::new("7cb21fade3321158cb5dbf85c41ed516889ff811"),
ObjectId::new("19357a8271c394d9a8a01bbf9bc3c7b39c2820cb"),
]);
vec![ObjectId::new("b67a5f29bccd11ce94c267538c93c519dae0a1ed"),
ObjectId::new("861eb484822c41220ff7adfee3b95aa10353414f")]);
} else {
panic!("expected to have a commit for the branch");
}
......@@ -490,18 +488,18 @@ fn test_read_user() {
fn test_read_user_public() {
let user_public: UserPublic = read_test_file("user_public");
assert_eq!(user_public.username, "ben.boeckel");
assert_eq!(user_public.name, "Ben Boeckel");
assert_eq!(user_public.id, UserId::new(13));
assert_eq!(user_public.username, "kwrobot");
assert_eq!(user_public.name, "Kitware Robot");
assert_eq!(user_public.id, UserId::new(11));
assert_eq!(user_public.state, UserState::Active);
assert_eq!(user_public.avatar_url,
"https://secure.gravatar.com/avatar/2f5f7e99190174edb5a2f66b8653b0b2?s=80&d=identicon");
"https://secure.gravatar.com/avatar/9ddcd45fcb89d966aab95b1f1002f84c?s=80&d=identicon");
assert_eq!(user_public.web_url,
"https://gitlab.kitware.com/ben.boeckel");
"https://gitlab.kitware.com/kwrobot");
assert_eq!(user_public.created_at,
UTC.ymd(2015, 2, 26)
.and_hms_milli(17, 23, 28, 730));
assert_eq!(user_public.bio, None);
.and_hms_milli(15, 58, 34, 670));
assert_eq!(user_public.bio, Some("".to_string()));
assert_eq!(user_public.location, None);
assert_eq!(user_public.skype, "");
assert_eq!(user_public.linkedin, "");
......@@ -509,19 +507,19 @@ fn test_read_user_public() {
assert_eq!(user_public.website_url, "");
assert_eq!(user_public.organization, None);
assert_eq!(user_public.last_sign_in_at,
Some(UTC.ymd(2017, 5, 11)
.and_hms_milli(14, 37, 30, 977)));
Some(UTC.ymd(2017, 4, 27)
.and_hms_milli(14, 59, 16, 823)));
assert_eq!(user_public.last_activity_on,
Some(NaiveDate::from_ymd(2017, 5, 10)));
Some(NaiveDate::from_ymd(2017, 6, 6)));
assert_eq!(user_public.confirmed_at,
UTC.ymd(2015, 2, 26)
.and_hms_milli(17, 23, 28, 693));
assert_eq!(user_public.email, "ben.boeckel@kitware.com");
assert_eq!(user_public.color_scheme_id, ColorSchemeId::new(2));
.and_hms_milli(15, 58, 34, 660));
assert_eq!(user_public.email, "kwrobot@kitware.com");
assert_eq!(user_public.color_scheme_id, ColorSchemeId::new(4));
assert_eq!(user_public.projects_limit, 50);
assert_eq!(user_public.current_sign_in_at,
Some(UTC.ymd(2017, 5, 11)
.and_hms_milli(17, 11, 30, 649)));
Some(UTC.ymd(2017, 6, 5)
.and_hms_milli(18, 46, 29, 512)));
assert!(user_public.identities.is_empty());
assert_eq!(user_public.can_create_group, true);
assert_eq!(user_public.can_create_project, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment