Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[full-ci] update libre-graph #8171

Merged
merged 2 commits into from
Dec 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .drone.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The version of OCIS to use in pipelines that test against OCIS
OCIS_COMMITID=6df93c392bee7fa2e4be21d44da6e6dfc3873e8a
OCIS_COMMITID=21797fb22d4eb5658f92dc29c33934ec90a97e4e
OCIS_BRANCH=master
1 change: 1 addition & 0 deletions changelog/unreleased/enhancement-update-libregraph
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Enhancement: Update libre-graph-api to v1.0
libre-graph-api has been updated to v1.0

https://github.com/owncloud/web/pull/8132
https://github.com/owncloud/web/pull/8171
6 changes: 3 additions & 3 deletions packages/web-app-files/src/mixins/spaces/actions/restore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ export default {
message,
hasInput: false,
onCancel: this.hideModal,
onConfirm: () => this.$_restore_restoreSpace(resources[0].id)
onConfirm: () => this.$_restore_restoreSpace(resources[0].id, resources[0].name)
}

this.createModal(modal)
},

$_restore_restoreSpace(id) {
$_restore_restoreSpace(id, name) {
const accessToken = this.$store.getters['runtime/auth/accessToken']
const graphClient = clientService.graphAuthenticated(this.configuration.server, accessToken)
return graphClient.drives
.updateDrive(
id,
{},
{ name },
{
headers: {
Restore: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default {
const { data } = await graphClient.drives.updateDrive(
storageId,
{
name: this.space.name,
special: [
{
specialFolder: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ describe('QuotaModal', () => {
graphMock.drives.updateDrive.mockImplementation(() =>
mockAxiosResolve({
id: '1fe58d8b-aa69-4c22-baf7-97dd57479f22',
name: 'any',
quota: {
remaining: 9999999836,
state: 'normal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {

const spaceMock = {
id: '1',
root: { permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }] }
root: { permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }] }
}

describe('SpaceContextActions', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('delete', () => {
const spaceMock = {
id: '1',
root: {
permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }]
permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }]
}
}
const { wrapper } = getWrapper()
Expand All @@ -41,7 +41,7 @@ describe('delete', () => {
const spaceMock = {
id: '1',
root: {
permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }],
permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }],
deleted: { state: 'trashed' }
}
}
Expand All @@ -54,7 +54,7 @@ describe('delete', () => {
const spaceMock = {
id: '1',
root: {
permissions: [{ roles: ['viewer'], grantedTo: [{ user: { id: 1 } }] }],
permissions: [{ roles: ['viewer'], grantedToIdentities: [{ user: { id: 1 } }] }],
deleted: { state: 'trashed' }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('disable', () => {
const spaceMock = {
id: '1',
root: {
permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }]
permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }]
}
}
const { wrapper } = getWrapper()
Expand All @@ -41,7 +41,7 @@ describe('disable', () => {
const spaceMock = {
id: '1',
root: {
permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }],
permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }],
deleted: { state: 'trashed' }
}
}
Expand All @@ -54,7 +54,7 @@ describe('disable', () => {
const spaceMock = {
id: '1',
root: {
permissions: [{ roles: ['viewer'], grantedTo: [{ user: { id: 1 } }] }]
permissions: [{ roles: ['viewer'], grantedToIdentities: [{ user: { id: 1 } }] }]
}
}
const { wrapper } = getWrapper()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('editQuota', () => {
id: '1',
quota: {},
root: {
permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }]
permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }]
}
}
const { wrapper } = getWrapper({ canEditSpaceQuota: true })
Expand All @@ -33,7 +33,7 @@ describe('editQuota', () => {
id: '1',
quota: {},
root: {
permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }]
permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }]
}
}
const { wrapper } = getWrapper({ canEditSpaceQuota: false })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('editReadmeContent', () => {
it('should be true for space managers', () => {
const spaceMock = {
id: '1',
root: { permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }] },
root: { permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }] },
special: [{ specialFolder: { name: 'readme' } }]
}

Expand All @@ -31,7 +31,7 @@ describe('editReadmeContent', () => {
it('should be false when spaceReadmeData does not exist', () => {
const spaceMock = {
id: '1',
root: { permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }] }
root: { permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }] }
}

const { wrapper } = getWrapper()
Expand All @@ -44,7 +44,7 @@ describe('editReadmeContent', () => {
it('should be false when the current user is a viewer', () => {
const spaceMock = {
id: '1',
root: { permissions: [{ roles: ['viewer'], grantedTo: [{ user: { id: 1 } }] }] }
root: { permissions: [{ roles: ['viewer'], grantedToIdentities: [{ user: { id: 1 } }] }] }
}

const { wrapper } = getWrapper()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('restore', () => {
const spaceMock = {
id: '1',
root: {
permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }]
permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }]
}
}
const { wrapper } = getWrapper()
Expand All @@ -41,7 +41,7 @@ describe('restore', () => {
const spaceMock = {
id: '1',
root: {
permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }],
permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }],
deleted: { state: 'trashed' }
}
}
Expand All @@ -54,7 +54,7 @@ describe('restore', () => {
const spaceMock = {
id: '1',
root: {
permissions: [{ roles: ['viewer'], grantedTo: [{ user: { id: 1 } }] }],
permissions: [{ roles: ['viewer'], grantedToIdentities: [{ user: { id: 1 } }] }],
deleted: { state: 'trashed' }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('setImage', () => {
id: '1',
quota: {},
root: {
permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }]
permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }]
},
special: [{ specialFolder: { name: 'image' }, file: { mimeType: 'image/png' } }]
}
Expand All @@ -46,7 +46,7 @@ describe('setImage', () => {
id: '1',
quota: {},
root: {
permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }]
permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }]
},
special: [{ specialFolder: { name: 'image' }, file: { mimeType: 'image/png' } }]
}
Expand All @@ -62,7 +62,7 @@ describe('setImage', () => {
id: '1',
quota: {},
root: {
permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }]
permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }]
},
special: [{ specialFolder: { name: 'image' }, file: { mimeType: 'image/png' } }]
}
Expand All @@ -78,7 +78,7 @@ describe('setImage', () => {
id: '1',
quota: {},
root: {
permissions: [{ roles: ['viewer'], grantedTo: [{ user: { id: 1 } }] }]
permissions: [{ roles: ['viewer'], grantedToIdentities: [{ user: { id: 1 } }] }]
},
special: [{ specialFolder: { name: 'image' }, file: { mimeType: 'image/png' } }]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('setReadme', () => {
it('should be false when mimeType is not text', () => {
const spaceMock = {
id: '1',
root: { permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }] },
root: { permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }] },
special: [{ specialFolder: { name: 'readme' } }]
}
const { wrapper } = getWrapper(true, buildSpace(spaceMock))
Expand All @@ -38,7 +38,7 @@ describe('setReadme', () => {
it('should be true when the mimeType is "text/plain"', () => {
const spaceMock = {
id: '1',
root: { permissions: [{ roles: ['manager'], grantedTo: [{ user: { id: 1 } }] }] },
root: { permissions: [{ roles: ['manager'], grantedToIdentities: [{ user: { id: 1 } }] }] },
special: [{ specialFolder: { name: 'readme' } }]
}
const { wrapper } = getWrapper(true, buildSpace(spaceMock))
Expand All @@ -51,7 +51,7 @@ describe('setReadme', () => {
it('should be true when when mimeType is text', () => {
const spaceMock = {
id: '1',
root: { permissions: [{ roles: ['viewer'], grantedTo: [{ user: { id: 1 } }] }] },
root: { permissions: [{ roles: ['viewer'], grantedToIdentities: [{ user: { id: 1 } }] }] },
special: [{ specialFolder: { name: 'readme' } }]
}
const { wrapper } = getWrapper(true, buildSpace(spaceMock))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const defaultGraphMock = () => {
const defaultUser = {
id: '1',
memberOf: [],
drive: {}
drive: {
name: 'any'
}
}

const graph = mockDeep<Graph>()
Expand Down Expand Up @@ -85,7 +87,7 @@ describe('Users view', () => {
roleId: '1'
})
)
graph.drives.updateDrive.mockImplementation(() => mockAxiosResolve({}))
graph.drives.updateDrive.mockImplementation(() => mockAxiosResolve({ name: 'any' }))
const wrapper = getMountedWrapper({ graph })
const busStub = jest.spyOn(eventBus, 'publish')
const setStub = jest.spyOn(wrapper.vm, '$set').mockImplementation(() => undefined)
Expand Down
Loading