diff --git a/dashboard/src/components/AppView/AccessURLTable/AccessURLTable.test.tsx b/dashboard/src/components/AppView/AccessURLTable/AccessURLTable.test.tsx
index 973d4b897eb..0e81508e8f0 100644
--- a/dashboard/src/components/AppView/AccessURLTable/AccessURLTable.test.tsx
+++ b/dashboard/src/components/AppView/AccessURLTable/AccessURLTable.test.tsx
@@ -12,46 +12,7 @@ import AccessURLTable from "./AccessURLTable";
describe("componentDidMount", () => {
it("fetches ingresses", () => {
const mock = jest.fn();
- shallow(
- ,
- );
- expect(mock).toHaveBeenCalled();
- });
-
- it("initiates a watch on services", () => {
- const mock = jest.fn();
- shallow(
- ,
- );
- expect(mock).toHaveBeenCalled();
- });
-});
-
-describe("componentWillUnmount", () => {
- it("closes watches on the Services", () => {
- const mock = jest.fn();
- const wrapper = shallow(
- ,
- );
- wrapper.unmount();
+ shallow();
expect(mock).toHaveBeenCalled();
});
});
@@ -81,13 +42,7 @@ context("when fetching ingresses or services", () => {
it("renders a message if there are no services or ingresses", () => {
const wrapper = shallow(
- ,
+ ,
);
expect(
wrapper
@@ -120,13 +75,7 @@ context("when the app contains services", () => {
} as IResource;
const services = [{ isFetching: false, item: service }];
const wrapper = shallow(
- ,
+ ,
);
expect(
wrapper
@@ -152,13 +101,7 @@ context("when the app contains services", () => {
} as IResource;
const services = [{ isFetching: false, item: service }];
const wrapper = shallow(
- ,
+ ,
);
expect(wrapper.find(AccessURLItem)).toExist();
expect(wrapper).toMatchSnapshot();
@@ -185,13 +128,7 @@ context("when the app contains ingresses", () => {
} as IResource;
const ingresses = [{ isFetching: false, item: ingress }];
const wrapper = shallow(
- ,
+ ,
);
expect(wrapper.find(AccessURLItem)).toExist();
expect(wrapper).toMatchSnapshot();
@@ -232,13 +169,7 @@ context("when the app contains services and ingresses", () => {
} as IResource;
const ingresses = [{ isFetching: false, item: ingress }];
const wrapper = shallow(
- ,
+ ,
);
expect(wrapper.find(AccessURLItem)).toExist();
expect(wrapper).toMatchSnapshot();
@@ -250,13 +181,7 @@ context("when the app contains resources with errors", () => {
const services = [{ isFetching: false, error: new Error("could not find Service") }];
const ingresses = [{ isFetching: false, error: new Error("could not find Ingress") }];
const wrapper = shallow(
- ,
+ ,
);
// The Service error is not shown, as it is filtered out because without the
diff --git a/dashboard/src/components/AppView/AccessURLTable/AccessURLTable.tsx b/dashboard/src/components/AppView/AccessURLTable/AccessURLTable.tsx
index 2a6a968d065..3269f56d848 100644
--- a/dashboard/src/components/AppView/AccessURLTable/AccessURLTable.tsx
+++ b/dashboard/src/components/AppView/AccessURLTable/AccessURLTable.tsx
@@ -11,8 +11,6 @@ interface IAccessURLTableProps {
services: Array>;
ingresses: Array>;
fetchIngresses: () => void;
- watchServices: () => void;
- closeWatches: () => void;
}
class AccessURLTable extends React.Component {
@@ -20,11 +18,6 @@ class AccessURLTable extends React.Component {
// Fetch all related Ingress resources. We don't need to fetch Services as
// they are expected to be watched by the ServiceTable.
this.props.fetchIngresses();
- this.props.watchServices();
- }
-
- public componentWillUnmount() {
- this.props.closeWatches();
}
public render() {
diff --git a/dashboard/src/containers/AccessURLTableContainer/AccessURLTableContainer.tsx b/dashboard/src/containers/AccessURLTableContainer/AccessURLTableContainer.tsx
index 8981998aec3..5b83fb12dcf 100644
--- a/dashboard/src/containers/AccessURLTableContainer/AccessURLTableContainer.tsx
+++ b/dashboard/src/containers/AccessURLTableContainer/AccessURLTableContainer.tsx
@@ -32,16 +32,6 @@ function mapDispatchToProps(
dispatch(actions.kube.getResource(r));
});
},
- watchServices: () => {
- props.serviceRefs.forEach(r => {
- dispatch(actions.kube.getAndWatchResource(r));
- });
- },
- closeWatches: () => {
- props.serviceRefs.forEach(r => {
- dispatch(actions.kube.closeWatchResource(r));
- });
- },
};
}