Skip to content

Throw exception when not use swsssdk in UT.#126

Merged
liuh-80 merged 14 commits intosonic-net:masterfrom
liuh-80:dev/liuh/disable-sdk
Oct 9, 2022
Merged

Throw exception when not use swsssdk in UT.#126
liuh-80 merged 14 commits intosonic-net:masterfrom
liuh-80:dev/liuh/disable-sdk

Conversation

@liuh-80
Copy link
Copy Markdown
Contributor

@liuh-80 liuh-80 commented Sep 9, 2022

Why I did it

swsssdk been deprecated after 202205 branch, all use should switch to sonic-swss-common.

How I did it

Throw exception when load swsssdk for none UT usage.

How to verify it

Pass all UT.

Which release branch to backport (provide reason below if selected)

Description for the changelog

Throw exception when load swsssdk for none UT usage.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@liuh-80
Copy link
Copy Markdown
Contributor Author

liuh-80 commented Sep 9, 2022

E2E test will validate with this PR: sonic-net/sonic-buildimage#12036

@liuh-80
Copy link
Copy Markdown
Contributor Author

liuh-80 commented Sep 27, 2022

This PR depends on another PR merge first: sonic-net/sonic-buildimage#12185

@liuh-80
Copy link
Copy Markdown
Contributor Author

liuh-80 commented Sep 27, 2022

The code change in this PR validated with this PR: sonic-net/sonic-buildimage#12036

@liuh-80 liuh-80 marked this pull request as ready for review September 28, 2022 03:09
@liuh-80 liuh-80 requested a review from qiluo-msft September 28, 2022 03:10
'high_perf': high_performance_deps
},
entry_points={
'console_scripts': [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console_scripts

Let's define a new var console_scripts in order to keep some history trace, and entry_points={}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for misleading. console_scripts variable should be defined at file global scope. It is not a parameter for setup function.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

self.assertEqual(dbConfig.get_dbid('APPL_DB', namespace), 0)

def test_BlockUseSwsssdk():
# change
Copy link
Copy Markdown
Contributor

@qiluo-msft qiluo-msft Sep 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change

You want to remove the whole comment line? #Closed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@liuh-80 liuh-80 merged commit e30a1e1 into sonic-net:master Oct 9, 2022
@liuh-80 liuh-80 deleted the dev/liuh/disable-sdk branch October 9, 2022 01:05
EdenGri pushed a commit to EdenGri/sonic-py-swsssdk that referenced this pull request Oct 30, 2022
#### Why I did it
swsssdk been deprecated after 202205 branch, all use should switch to sonic-swss-common.

#### How I did it
Throw exception when load swsssdk for none UT usage.

#### How to verify it
Pass all UT.

#### Which release branch to backport (provide reason below if selected)

#### Description for the changelog
Throw exception when load swsssdk for none UT usage.

#### Link to config_db schema for YANG module changes

#### A picture of a cute animal (not mandatory but encouraged)
EdenGri pushed a commit to EdenGri/sonic-py-swsssdk that referenced this pull request Oct 30, 2022
#### Why I did it
swsssdk been deprecated after 202205 branch, all use should switch to sonic-swss-common.

#### How I did it
Throw exception when load swsssdk for none UT usage.

#### How to verify it
Pass all UT.

#### Which release branch to backport (provide reason below if selected)

#### Description for the changelog
Throw exception when load swsssdk for none UT usage.

#### Link to config_db schema for YANG module changes

#### A picture of a cute animal (not mandatory but encouraged)
EdenGri pushed a commit to EdenGri/sonic-py-swsssdk that referenced this pull request Oct 31, 2022
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Oct 31, 2022
Update sonic-py-swsssdk submodule pointer to include the following:
* e30a1e1 Throw exception when not use swsssdk in UT. ([sonic-net#126](sonic-net/sonic-py-swsssdk#126))

Signed-off-by: dprital <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants