diff --git a/web/src/App.test.jsx b/web/src/App.test.jsx
index de68c6a66e..ea981dea28 100644
--- a/web/src/App.test.jsx
+++ b/web/src/App.test.jsx
@@ -20,7 +20,7 @@ import { Link, BrowserRouter as Router } from 'react-router-dom'
import { Provider } from 'react-redux'
import { fetchInfoIfNeeded } from './actions/info'
-import createZuulStore from './store'
+import store from './store'
import App from './App'
import TenantsPage from './pages/Tenants'
import StatusPage from './pages/Status'
@@ -35,7 +35,6 @@ api.fetchConfigErrors.mockImplementation(() => Promise.resolve({data: []}))
it('renders without crashing', () => {
const div = document.createElement('div')
- const store = createZuulStore()
ReactDOM.render(,
div)
ReactDOM.unmountComponentAtNode(div)
@@ -50,7 +49,6 @@ it('renders multi tenant', () => {
api.fetchTenants.mockImplementation(
() => Promise.resolve({data: [{name: 'openstack'}]})
)
- const store = createZuulStore()
const application = ReactTestUtils.renderIntoDocument(
)
@@ -81,7 +79,6 @@ it('renders single tenant', () => {
api.fetchStatus.mockImplementation(
() => Promise.resolve({data: {pipelines: []}})
)
- const store = createZuulStore()
const application = ReactTestUtils.renderIntoDocument(
)
diff --git a/web/src/containers/status/ChangePanel.test.jsx b/web/src/containers/status/ChangePanel.test.jsx
index c46daf13bb..a44c9c8b4e 100644
--- a/web/src/containers/status/ChangePanel.test.jsx
+++ b/web/src/containers/status/ChangePanel.test.jsx
@@ -19,7 +19,7 @@ import { Link, BrowserRouter as Router } from 'react-router-dom'
import { Provider } from 'react-redux'
import { setTenantAction } from '../../actions/tenant'
-import createZuulStore from '../../store'
+import store from '../../store'
import ChangePanel from './ChangePanel'
@@ -33,7 +33,6 @@ const fakeChange = {
}
it('change panel render multi tenant links', () => {
- const store = createZuulStore()
store.dispatch(setTenantAction('tenant-one', false))
const application = ReactTestUtils.renderIntoDocument(
@@ -49,7 +48,6 @@ it('change panel render multi tenant links', () => {
})
it('change panel render white-label tenant links', () => {
- const store = createZuulStore()
store.dispatch(setTenantAction('tenant-one', true))
const application = ReactTestUtils.renderIntoDocument(
diff --git a/web/src/index.js b/web/src/index.js
index 07ad3ce37c..98e0b06d0a 100644
--- a/web/src/index.js
+++ b/web/src/index.js
@@ -26,11 +26,9 @@ import './index.css'
import { getHomepageUrl } from './api'
import registerServiceWorker from './registerServiceWorker'
import { fetchInfoIfNeeded } from './actions/info'
-import createZuulStore from './store'
+import store from './store'
import App from './App'
-const store = createZuulStore()
-
// Load info endpoint
store.dispatch(fetchInfoIfNeeded())
diff --git a/web/src/store.js b/web/src/store.js
index bad6b19466..ec1b8443b5 100644
--- a/web/src/store.js
+++ b/web/src/store.js
@@ -17,6 +17,6 @@ import thunk from 'redux-thunk'
import appReducers from './reducers'
-export default function createZuulStore() {
- return createStore(appReducers, applyMiddleware(thunk))
-}
+const store = createStore(appReducers, applyMiddleware(thunk))
+
+export default store
\ No newline at end of file